A068157 Duplicate of A062530.
3, 5, 11, 97, 1847, 5623, 89753, 3851587, 1872852203, 1999066711903
Offset: 0
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.
a(2)=7 because 7 and 11 are consecutive primes with difference 2^2=4. a(3)=89 because 89 and 97 are consecutive primes with difference 2^3=8.
f[n_] := Block[{k = 1}, While[Prime[k + 1] != n + Prime[k], k++ ]; Prime[k]]; Do[ Print[ f[2^n]], {n, 0, 10}] (* Robert G. Wilson v, Jan 13 2005 *)
import sympy n=0 while n>=0: p=2 while sympy.nextprime(p)-p!=(2**n): p=sympy.nextprime(p) print(p) n=n+1 p=sympy.nextprime(p) ## Abhiram R Devesh, Aug 09 2014
Comments