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!)
A065022 Composite n such that the sums of the composite numbers up to n, +/- 1, are twin primes. 1
4, 8, 290, 340, 352, 412, 489, 610, 774, 785, 1227, 1295, 1306, 1795, 1853, 1918, 1945, 2014, 2266, 2502, 2885, 3063, 3133, 3178, 3265, 3482, 3486, 3680, 3760, 3843, 3973, 3995, 4124, 4794, 5677, 5769, 5965, 6123, 7555, 7653, 7696, 7765, 7786, 8023 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
4+6+8 = 18 and 18 +/-1 are twin primes.
MATHEMATICA
Composite[n_Integer] := (k = n + PrimePi[n] + 1; While[k - PrimePi[k] - 1 != n, k++ ]; k); s = 0; Do[m = Composite[n]; s = s + m; If[ PrimeQ[s - 1] && PrimeQ[s + 1], Print[m]], {n, 1, 10^4} ]
PROG
(PARI) is(n)=my(s); if(isprime(n), return(0)); forcomposite(k=4, n, s+=k); isprime(s-1)&&isprime(s+1) \\ Charles R Greathouse IV, Jan 02 2014
(PARI) s=0; forcomposite(n=4, 8023, s+=n; if(isprime(s-1) && isprime(s+1), print1(n", "))) \\ Charles R Greathouse IV, Jan 02 2014
CROSSREFS
Sequence in context: A085631 A074073 A090653 * A012994 A136386 A260726
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Nov 01 2001
EXTENSIONS
New name from Charles R Greathouse IV, Jan 02 2014
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 May 10 04:09 EDT 2024. Contains 372356 sequences. (Running on oeis4.)