login
A137780
a(n) = 1 + 2^( prime(n + 1) - prime(n) ).
1
3, 5, 5, 17, 5, 17, 5, 17, 65, 5, 65, 17, 5, 17, 65, 65, 5, 65, 17, 5, 65, 17, 65, 257, 17, 5, 17, 5, 17, 16385, 17, 65, 5, 1025, 5, 65, 65, 17, 65, 65, 5, 1025, 5, 17, 5, 4097, 4097, 17, 5, 17, 65, 5, 1025, 65, 65, 65, 5, 65, 17, 5, 1025, 16385, 17, 5, 17, 16385, 65, 1025, 5
OFFSET
1,1
LINKS
FORMULA
From M. F. Hasler, Apr 21 2009: (Start)
a(n) = 1 + 2^A001223(n).
A001223(n) = A001511([a(n)/2]) = A007814(a(n)-1).
a(n) = 1+4^A028334(n) for n>1. (End)
MATHEMATICA
Table[1 + 2^(Prime[n + 1] - Prime[n]), {n, 1, 50}] (* G. C. Greubel, Feb 23 2017 *)
1+2^#&/@Differences[Prime[Range[70]]] (* Harvey P. Dale, Feb 18 2023 *)
PROG
(PARI) a(n) = 1 + 2^( prime(n + 1) - prime(n) )
(Python)
from sympy import prime
def A137780(n): return 1+(1<<(prime(n+1)-prime(n))) # Chai Wah Wu, Jul 08 2022
CROSSREFS
Sequence in context: A084041 A028254 A318351 * A079372 A055382 A165235
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Extended beyond a(30) by M. F. Hasler, Apr 21 2009
STATUS
approved