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!)
A233546 Smallest k such that 6^n+k, 6^n+k+g, 6^n+k+2*g are consecutive primes in arithmetic progression. 4
11, 35, 65, 41, 221, 655, 515, 263, 4265, 893, 4085, 1031, 3161, 145, 821, 2083, 2101, 433, 3743, 2243, 511, 2623, 5653, 271, 2885, 4157, 18023, 9023, 1151, 4787, 737, 2141, 2833, 6181, 3217, 3635, 715, 4501, 5381, 4231, 13265, 823 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
The sequence starts at n=2 as there is no solution for n=1.
The primes are probable primes for n>23.
LINKS
EXAMPLE
6^2+11=47, 6^2+11+6=53, 6^2+11+2*6=59 and 47, 53, 59 are consecutive primes
and k=11 is minimal (since although 6^2+5=41, 6^2+5+6=47, 6^2+5+2*6=53 are primes, they are not consecutive primes), so a(2)=11. (Example clarified by Jonathan Sondow, Dec 16 2013.)
MATHEMATICA
a[n_] := For[k = 1, True, k = k+2, p = 6^n+k; If[PrimeQ[p], q = NextPrime[p]; r = NextPrime[q]; g = q-p; If[g == r-q, Print["n = ", n, " k = ", k, " g = ", g, " ", {p, q, r}]; Return[k]]]]; Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Dec 17 2013 *)
PROG
(PFGW & SCRIPT)
DIM n, 1
DIM i
DIM J
DIM k
DIM pp
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL a
SET n, n+1
IF n>350 THEN END
SET i, -1
SET j, 0
SET k, 0
LABEL b
SET i, i+2
SETS t, %d, %d, %d, %d\,; n; i; j; k
SET pp, 6^n+i
PRP pp, t
IF ISPRP THEN GOTO c
GOTO b
LABEL c
SET j, j+2
SET pp, 6^n+i+j
SETS t, %d, %d, %d, %d\,; n; i; j; k
PRP pp, t
IF ISPRP THEN GOTO d
GOTO c
LABEL d
IF j%6==0 THEN GOTO e
SET i, i+j
SET j, 0
GOTO c
LABEL e
SET k, k+2
SETS t, %d, %d, %d, %d\,; n; i; j; k
SET pp, 6^n+i+j+k
PRP pp, t
IF ISPRP && k==j THEN GOTO h
IF ISPRP THEN GOTO f
GOTO e
LABEL f
IF k%6==0 THEN GOTO g
SET i, i+j+k
SET j, 0
SET k, 0
GOTO c
LABEL g
SET i, i+j
SET j, k
SET k, 0
GOTO e
LABEL h
WRITE myf, t
GOTO a
CROSSREFS
Sequence in context: A319971 A118554 A348845 * A092069 A103115 A003777
KEYWORD
nonn
AUTHOR
Pierre CAMI, Dec 12 2013
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)