cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A078680 Smallest m > 0 such that n*2^m + 1 is prime, or 0 if no such m exists.

This page as a plain text file.
%I A078680 #43 Feb 16 2025 08:32:48
%S A078680 1,1,1,2,1,1,2,1,1,2,1,3,2,1,1,4,3,1,6,1,1,2,1,2,2,1,2,2,1,1,8,3,1,2,
%T A078680 1,1,2,5,1,4,1,3,2,1,2,8,583,1,2,1,1,6,1,1,4,1,2,2,5,2,4,7,1,2,1,5,2,
%U A078680 1,1,2,3,3,2,1,1,4,3,1,2,3,1,10,1,2,4,1,2,2,1,1,8,7,2,582,1,1,2,1,1,2,3,2
%N A078680 Smallest m > 0 such that n*2^m + 1 is prime, or 0 if no such m exists.
%C A078680 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]
%H A078680 T. D. Noe, <a href="/A078680/b078680.txt">Table of n, a(n) for n = 1..1000</a>
%H A078680 N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=3RAYoaKMckM">A Nasty Surprise in a Sequence and Other OEIS Stories</a>, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; <a href="https://sites.math.rutgers.edu/~zeilberg/expmath/sloane85BD.pdf">Slides</a> [Mentions this sequence]
%H A078680 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SierpinskiNumberoftheSecondKind.html">Sierpiński Number of the Second Kind</a>
%F A078680 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
%p A078680 A078680 := proc(n) for m from 1 do if isprime(n*2^m+1) then return m; end if; end do: end proc:
%p A078680 seq(A078680(n),n=1..30) ; # _R. J. Mathar_, Feb 25 2011
%t A078680 Table[m=1; While[! PrimeQ[n*2^m+1], m++]; m, {n, 100}] (* _T. D. Noe_, Feb 25 2011 *)
%o A078680 (PARI) a(n)=if(n<0, 0, m=1; while(isprime(n*2^m+1)==0, m++); m)
%Y A078680 Cf. A050412, A040076, A078683 (primes n*2^m+1).
%K A078680 nonn
%O A078680 1,4
%A A078680 _Benoit Cloitre_, Dec 17 2002
%E A078680 Offset corrected by _Jaroslav Krizek_, Feb 13 2011