OFFSET
1,4
COMMENTS
Sierpiński proved that a(n)=0 for an infinite number of n. The first proven zero is n=78557. There is a conjecture that the first zero is n=65536 (which is equivalent to the statement that 2^(2^k)+1 is composite for k>4). - T. D. Noe, Feb 25 2011 [Edited by Jeppe Stig Nielsen, Jul 01 2020]
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
N. J. A. Sloane, A Nasty Surprise in a Sequence and Other OEIS Stories, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; Slides [Mentions this sequence]
Eric Weisstein's World of Mathematics, Sierpiński Number of the Second Kind
FORMULA
If a(n) = 0, then a(2n) is also 0. If a(n) = m with m > 1, then a(2n) = m-1. - Jeppe Stig Nielsen, Feb 12 2023
MAPLE
A078680 := proc(n) for m from 1 do if isprime(n*2^m+1) then return m; end if; end do: end proc:
seq(A078680(n), n=1..30) ; # R. J. Mathar, Feb 25 2011
MATHEMATICA
Table[m=1; While[! PrimeQ[n*2^m+1], m++]; m, {n, 100}] (* T. D. Noe, Feb 25 2011 *)
PROG
(PARI) a(n)=if(n<0, 0, m=1; while(isprime(n*2^m+1)==0, m++); m)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Benoit Cloitre, Dec 17 2002
EXTENSIONS
Offset corrected by Jaroslav Krizek, Feb 13 2011
STATUS
approved