%I
%S 1,3,171,13203,97641,354537,2354697,10970073,29884473,33894369,
%T 38265939,74214171,116226009,344380329,751611177,892145817,2595432537,
%U 4014314433,10161972027,11852199369,13229694441,22032887841,22230967347,22864359897,24020090001,26761542921,27439598619,27932906619,37498011939,166111451217,189836046171,197678101833,224737264539,325152438921,330961409811,730922071851,893842021161
%N Primitive elements of the sequence of integers n such that n divides 2^n + 1 (A006521).
%C This gives a sparse subsequence of the sequence A006521 of all integers n such that n  2^n+1. An element of A006521 is said to be *primitive* if it is not divisible by any smaller element of A006521 having the same prime divisors and further it is not the lcm of any two smaller elements of A006521. See Proposition 1 of the link.
%C Every element of this sequence apart from 1 and 3 is divisible either by 27 or by 171. Stronger results hold. For instance, every element of this sequence apart from 1 and 3 is divisible either by 171 or 243 or 13203 or 2354697 or 10970073 or 22032887841. See the link or A136475 for more details about such results. These alternative factors enable the sequence to be generated much more quickly than by the short Maple program given below.
%H Toby Bailey and Chris Smyth, <a href="http://www.maths.ed.ac.uk/~chris/papers/n_divides_2to_nplus1.pdf">Primitive solutions of n2^n+1</a>.
%e 9 is in A006521 but is not primitive because its set of prime divisors is the same as that of 3, which divides 9 and is in A006521.
%e 250857 is in A006521 but not primitive, as 250857=lcm(171,13203) and both 171 and 13203 are in A006521.
%p L:=1: S:={}: for j from 3 by 6 to 10^7 do if not 2&^j+1 mod j = 0 then next end if; if not (j in S) then L := L,j end if; S := S union map( ilcm, S, j ) union {j}; S := S union map(`*`, {map2( op, 1, ifactors(j)[2] )[]}, j); end do: L;
%Y Cf. A006521, A136474, A136475.
%K nonn
%O 1,2
%A Toby Bailey and _Christopher J. Smyth_, Jan 13 2008
%E More terms from _Max Alekseyev_, Aug 04 2011
