login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A295738 a(1)=2, a(2)=3; for n > 2, a(n) is the smallest prime number greater than a(n-1) which has the form a(n-2)*2^k - a(n-1) for some integer k. 1
2, 3, 5, 7, 13, 43, 61, 283, 1669, 2316667, 3670169811199621, 21880301185536674566743742843, 554620380869291027814931305550350952069, 846453153412475180263654973437331373840097042541795707 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(15) = 1128606171...0947680901 contains 276 digits.
a(16) = 2855795709...8400549243 contains 4622 digits. - Robert G. Wilson v, Nov 30 2017
The corresponding k are 2, 2, 2, 3, 3, 3, 5, 13, 41, 73, 77, 85, 785, ...
If the condition a(1) < a(2) < a(3) < ... is not satisfied, the sequence becomes 2, 3, 5, 7, 3, 11, 13, 31, 73, 919, ... where a(5) = 3 = 5*2^1 - 7.
Conjecture 1:
For n > 1, a(2n)== 7 (mod 12) and a(2n+1)== 1 (mod 12);
for n > 2, a(2n)== 19 (mod 24) and a(2n-1)== 13 (mod 24).
Conjecture 2:
For n > 1, L(a(2n)/a(2n+1)) = -1 and L(a(2n+1)/a(2n+2)) = 1 where L(x/y) is the Legendre symbol.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..15
EXAMPLE
5 = 2*2^2 - 3; 7 = 3*2^2 - 5; 13 = 5*2^2 - 7; 43 = 7*2^3 - 13.
MAPLE
p1:=2:p2:=3:
for n from 1 to 12 do:
ii:=0:
for k from 0 to 10^6 while(ii=0) do:
p3:=p1*2^k-p2:
if p3=floor(p3) and isprime(p3) and p3 > p2
then
ii:=1:p1:=p2:p2:=p3:printf(`%d, `, p3):
else
fi:
od:
od:
MATHEMATICA
f[s_List] := Block[{k = 0, p = s[[-2]], q = s[[-1]]}, While[r = p*2^k - q; r <= q || ! PrimeQ@r, k++]; Append[s, r]]; s = {2, 3}; Nest[f, s, 12] (* Robert G. Wilson v, Nov 30 2017 *)
PROG
(PARI) first(n) = { my(res = vector(n)); res[1]=2; res[2]=3; for(x=3, n, for(k=0, +oo, my(p=res[x-2]*2^k-res[x-1]); if(isprime(p) && p > res[x-1], res[x]=p; break()))); res; } \\ Iain Fox, Nov 29 2017
CROSSREFS
Cf. A000040.
Sequence in context: A072826 A084761 A038965 * A265781 A344360 A250407
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 26 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)