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.

A084435 a(1) = 2, then smallest prime of the form 2^k*a(n-1) + 1.

This page as a plain text file.
%I A084435 #21 Jan 13 2019 19:14:54
%S A084435 2,3,7,29,59,1889,3779,7559,4058207223809,32465657790473,
%T A084435 4462046030502692971872257,9582170887127842377060195852353537
%N A084435 a(1) = 2, then smallest prime of the form 2^k*a(n-1) + 1.
%C A084435 This sequence also is generated when the initial term is 1. It is unclear if the sequence is finite or infinite. - _Bob Selcoe_, Oct 09 2015
%D A084435 Donald E. Knuth, The Art of Computer Programming, Vol. 2, Seminumerical Algorithms, problem 39, page 76.
%H A084435 Robert G. Wilson v, <a href="/A084435/b084435.txt">Table of n, a(n) for n = 1..15</a> (shortened by _N. J. A. Sloane_, Jan 13 2019)
%e A084435 a(3)=7 because 3*2+1=7 is prime;
%e A084435 a(4)=29 because 7*2+1=15 is not prime, 7*4+1=29 is prime.
%t A084435 f[s_List] := Block[{k = 0, p = s[[-1]]}, While[q = 2^k*p + 1; !PrimeQ[ q], k++]; Append[s, q]]; s = {2}; Nest[f, s, 16] (* _Robert G. Wilson v_, Mar 11 2015 *)
%o A084435 (PARI) lista(nn) = {a = 2; print1(a, ", "); for (n=1, nn, k=0; while (!isprime(2^k*a+1), k++); a = 2^k*a+1; print1(a, ", "););} \\ _Michel Marcus_, Mar 18 2015
%Y A084435 Cf. A113767, A192580.
%K A084435 nonn
%O A084435 1,1
%A A084435 _Amarnath Murthy_, Jun 03 2003