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!)
A214496 Smallest k>0 such that (3^n+k)*3^n-1 and (3^n+k)*3^n+1 are a twin prime pair. 4
1, 3, 3, 7, 21, 29, 113, 31, 61, 13, 179, 237, 33, 201, 613, 171, 347, 291, 907, 437, 523, 193, 1039, 729, 567, 231, 1847, 931, 1023, 821, 329, 3937, 6137, 319, 1663, 667, 1837, 529, 1769, 1959, 1781, 743, 3223, 591, 613, 473, 5679, 2137, 567, 459, 4729 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Conjecture : there is always one such k for each n>0.
Heuristically, as N increases, the average of a(n)/n^2 for n=1 to N tends to 1.2
LINKS
MAPLE
A214496 := proc(n)
local k;
for k from 1 do
p := (3^n+k)*3^n-1 ;
if isprime(p) and isprime(p+2) then
return k;
end if;
end do:
end proc: # R. J. Mathar, Jul 23 2012
PROG
(PFGW64 and SCRIPTIFY)
SCRIPT
DIM nn, 0
DIM kk
DIM jj
DIMS tt
OPENFILEOUT myfile, a(n).txt
OPENFILEOUT myf, b(n).txt
LABEL loopn
SET nn, nn+1
SET jj, 0
IF nn>500 THEN END
SET kk, -1
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\,; nn; kk
PRP (3^nn+kk)*3^nn-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
SET jj, jj+1
PRP (3^nn+kk)*3^nn+1, tt
IF ISPRP THEN GOTO d
IF ISPRIME THEN GOTO d
GOTO loopk
LABEL d
WRITE myfile, tt
SETS tt, %d, %d\,; nn; jj
WRITE myf, tt
GOTO loopn
CROSSREFS
Cf. A214495.
Sequence in context: A174034 A081486 A097334 * A046631 A100666 A262375
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 20 2012
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.)