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
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 26 2017
STATUS
approved