cp's OEIS Frontend

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.

Showing 1-6 of 6 results.

A053872 Primes arising in A053782.

Original entry on oeis.org

37, 199, 277, 367, 997, 1049, 1103, 1451, 1709, 1777, 2137, 2213, 2953, 3041, 3407, 3889, 3989, 4091, 5309, 7193, 7883, 11113, 13757, 15083, 16073, 17093, 28643, 28909, 30259, 32203, 35089, 35977, 40879, 42157, 43451, 43777, 48119, 51949
Offset: 1

Views

Author

G. L. Honaker, Jr., Mar 30 2000

Keywords

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[If[PrimeQ[n],NULL,s+=n;If[PrimeQ[s],AppendTo[lst,s]]],{n,2,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 01 2009 *)
  • PARI
    lista(nn) = {my(s = 0); forcomposite(c=1, nn, s += c; if (isprime(s), print1(s, ", ")););} \\ Michel Marcus, May 13 2018
  • Python
    from sympy import isprime
    A053872_list, n, m, s = [], 1, 4, 4
    while len(A053872_list) < 10000:
        if isprime(s):
            A053872_list.append(s)
        m += 1
        if isprime(m):
            m += 1
        n += 1
        s += m # Chai Wah Wu, May 13 2018
    

Extensions

More terms from Reiner Martin, Jul 17 2001

A234847 Primes which are sum of the first k composite numbers and such that the sum of the first k+1 composites is also prime.

Original entry on oeis.org

997, 1049, 1709, 2137, 2953, 3889, 3989, 28643, 43451, 121937, 189239, 225077, 662843, 785303, 860143, 874351, 959209, 1026229, 1051151, 1271687, 1285507, 1772297, 2525801, 2834413, 2865199, 3456053, 3484361, 3538477, 4402241, 4762267, 8240539, 11557543, 15774301
Offset: 1

Views

Author

Robin Garcia, Dec 31 2013

Keywords

Examples

			a(1)= 997 is prime and sum of the first 35 composites from 4 to 51. And the sum of the first 36 composites is 1049 and is also prime.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Accumulate[Select[Range[ 10000], CompositeQ]],2,1],AllTrue[ #,PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 12 2014 *)
  • PARI
    i=0; b=0; for( a=2, 6000, if( !isprime(a) ,i=i+1; b=b+a; if(( isprime(b) & isprime(b+a+1)& !isprime(a+1)) || (isprime(b) & isprime(b+a+2) & isprime(a+1)), print1(b,", "))))

A235165 Primes which are sum of the first k consecutive composite numbers and such that the sum of the first consecutive k+1 composites and the sum of the first k+2 consecutive composites are also prime.

Original entry on oeis.org

997, 3889, 320375057, 423704707, 3431156159, 11650632419, 15909713927, 16906981181, 18170097067, 19703643541, 25534764667, 65405464363, 89483860811, 96873744973, 157599307213, 161983109531, 250812627893, 255555662521, 304165468751, 506667567067, 563313151277, 641930941499, 719915546257, 755132545199, 988899991367, 1002877111091, 1013997492671
Offset: 1

Views

Author

Robin Garcia, Jan 04 2014

Keywords

Examples

			a(1) = 997 is prime and sum of the first 35 composites from 4 to 51.
And 997 + 52 = 1049 is prime and 1049 + 54 = 1103 is prime. But 1103 + 55 is even and thus not prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Accumulate[Select[Range[20*10^6],CompositeQ]],3,1], AllTrue[ #,PrimeQ]&][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 30 2017 *)
  • PARI
    i=0; b=0; for( a=2, 2*10^6, if( !isprime(a) , i=i+1; b=b+a; if(( isprime(b) & isprime(b+a+1) &isprime(a+2)& isprime(b+2*a+4))||(isprime(b)&isprime(a+1)&isprime(b+a+2)&isprime(a+3)&isprime(b+2*a+6)),print1(b,", "))))

A155974 Partial sums of A053872.

Original entry on oeis.org

37, 236, 513, 880, 1877, 2926, 4029, 5480, 7189, 8966, 11103, 13316, 16269, 19310, 22717, 26606, 30595, 34686, 39995, 47188, 55071, 66184, 79941, 95024, 111097, 128190, 156833, 185742, 216001, 248204, 283293, 319270, 360149, 402306, 445757
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    s1=s2=0;lst={};Do[If[PrimeQ[n],NULL,s1+=n;If[PrimeQ[s1],s2+=s1;AppendTo[lst,s2]]],{n,2,6!}];lst

Extensions

Definition corrected by N. J. A. Sloane, Feb 02 2009

A235167 Primes which are the sum of the first k consecutive composite numbers and such that the sums of the first k+1, k+2 and k+3 consecutive composites are also prime.

Original entry on oeis.org

1041973527756883, 1367813419317223, 2061752246097991, 2952443719006597, 3103011021307399, 3372968619197677, 10155190978946137, 34071498970634821, 43003872349213873, 45743947962658333, 58096932030228859, 60092475306807649, 115486262684753671
Offset: 1

Views

Author

Robin Garcia, Jan 04 2014

Keywords

Examples

			a(1) = 1041973527756883 is the least prime, sum of the first consecutive 44208182 composites from 4 to 47042265, and such that the sum of the first 44208183, 44208184 and 44208185 composites are 1041973574799149, 1041973621841417, 1041973668883687, all prime.
		

Crossrefs

Programs

  • PARI
    i=0; b=0; for( a=2, 2*10^8, if( !isprime(a) , i=i+1; b=b+a; if(( isprime(b) &a%2==1& isprime(b+a+1)) &isprime(a+2)& isprime(b+2*a+4)&isprime( a+4)&isprime(b+3*a+9), print1(b,", "))))

Extensions

a(8)-a(13) from Donovan Johnson, Jan 06 2014

A308610 Numbers k such that Sum_{j=1..k} composite(j)^composite(j) is prime, where composite(j) is the j-th composite number.

Original entry on oeis.org

7, 194, 219
Offset: 1

Views

Author

Metin Sariyar, Aug 23 2019

Keywords

Comments

If it exists, a(4) > 25800.

Examples

			7 is a term because for the first 7 composites, 4^4 + 6^6 + 8^8 + 9^9 + 10^10 + 12^12 + 14^14 = 11120933330250889 is prime.
		

Crossrefs

Programs

  • Mathematica
    f[ n_Integer ] := Block[ {k = n + PrimePi[ n ] + 1}, While[ k - PrimePi[ k ] - 1 != n, k++ ]; k ]; s = 0; Do[ s = s + f[n]^f[n]; If[ PrimeQ[ s ], Print[ n ] ], {n, 1, 1000} ]
Showing 1-6 of 6 results.