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!)
A164689 If p and q are (odd) twin primes and q > p then p*q^2+(p+q)+1 is divisible by 3; a(n) = (p*q^2+(p+q)+1)/3. 2
28, 86, 628, 2058, 9310, 25298, 73220, 126168, 357238, 423828, 882418, 1132550, 1954860, 2371648, 2600598, 3968188, 4627280, 6585390, 7501858, 10156328, 14088548, 24754940, 26936208, 32941678, 47503218, 61839490, 72120200 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = 2*A151990(n). - R. J. Mathar, Sep 18 2009
MAPLE
A001359 := proc(n) if n = 1 then 3; else for p from procname(n-1)+2 by 2 do if isprime(p) and isprime(p+2) then RETURN(p) ; fi; od: fi; end: A164689 := proc(n) p := A001359(n) ; (p+1)*(p^2+3*p+3)/3 ; end: seq(A164689(n), n=1..80) ; # R. J. Mathar, Sep 18 2009
MATHEMATICA
(* b = A001359 *)
b[n_] := b[n] = If[n == 1, 3, Module[{p = NextPrime[b[n - 1]]}, While[ !PrimeQ[p + 2], p = NextPrime[p]]; p]];
a[n_] := With[{p = b[n]}, (p + 1)(p^2 + 3 p + 3)/3];
Array[a, 27] (* Jean-François Alcover, Mar 31 2020 *)
CROSSREFS
Cf. A151990.
Sequence in context: A042540 A042544 A042546 * A096384 A065655 A341623
KEYWORD
nonn
AUTHOR
Tanin (Mirza Sabbir Hossain Beg) (mirzasabbirhossainbeg(AT)yahoo.com), Aug 22 2009
EXTENSIONS
Incorrect leading term deleted by N. J. A. Sloane, Sep 14 2009
More terms from R. J. Mathar, Sep 18 2009
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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)