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-10 of 10 results.

A140596 Squares nearest to and < terms in A098562.

Original entry on oeis.org

9, 20449, 75625, 238144, 2208196, 3579664, 29192409, 39992976, 45441081, 55591936, 77281681, 108076816, 114982729, 155625625, 226201600, 302899216, 324648324, 519657616, 551310400, 618317956, 796989361, 943964176, 1039675536
Offset: 1

Views

Author

Enoch Haga, May 17 2008

Keywords

Examples

			The first term of A098562 is 13, the prime sum of 2^2=4 and 3^2=9. The square just preceding 13 is 9, the first term of this sequence.
		

Crossrefs

Formula

a(n) = A048760(A098562(n)). - Jason Yuen, Sep 30 2024

A140597 Squares nearest to and > terms in A098562.

Original entry on oeis.org

16, 20736, 76176, 239121, 2211169, 3583449, 29203216, 40005625, 45454564, 55606849, 77299264, 108097609, 115004176, 155650576, 226231681, 302934025, 324684361, 519703209, 551357361, 618367689, 797045824, 944025625, 1039740025
Offset: 1

Views

Author

Enoch Haga, May 17 2008

Keywords

Examples

			The first term of A098562 is 13, the prime sum of 2^2 + 3^2, where 4+9=13. The square just exceeding 13 is 16, the first term of this sequence.
		

Crossrefs

Formula

a(n) = A048761(A098562(n)). - Jason Yuen, Sep 30 2024

A024450 Sum of squares of the first n primes.

Original entry on oeis.org

4, 13, 38, 87, 208, 377, 666, 1027, 1556, 2397, 3358, 4727, 6408, 8257, 10466, 13275, 16756, 20477, 24966, 30007, 35336, 41577, 48466, 56387, 65796, 75997, 86606, 98055, 109936, 122705, 138834, 155995, 174764, 194085, 216286, 239087, 263736, 290305, 318194
Offset: 1

Views

Author

Keywords

Comments

It appears that the only square in this sequence is 4. Checked 10^11 terms. a(10^11) = 247754953701579144582110673365391267. - T. D. Noe, Sep 06 2005
a(2n-1) is divisible by 2, a(3n+1) is divisible by 3, a(4n-3) is divisible by 4, a(6n+1) is divisible by 6, a(8n-3) is divisible by 8, a(12n+1) is divisible by 12, a(24n-11) is divisible by 24. - Alexander Adamchuk, Jun 15 2006
The sequence is best looked at in base 12, with X for 10 and E for 11: 4, 11, 32, 73, 154, 275, 476, 717, X98, 1479, 1E3X, 289E, 3860, 4941, 6082, 7823, 9844, EX25, 12546, 15447, 18548, 20089, 2406X, 2876E, 320E0, 37E91, 42152, 488E3, 53754, 5E015, 68416, 76337, 85178, 94399, X51EX, E643E, 108760, 120001. Since the squares of all primes greater than 3 are always 1 mod 12, the sequence obeys the rule a(n) mod 12 = (n-1) mod 12 for n>=2. The rule gives a(2n-1) = (2n-2) mod 12 and so a(2n-1) must be divisible by 2. a(3n+1) = (3n) mod 12 so a(3n+1) is divisible by 3. The other rules are proved similarly. Remember: base 12 is a research tool! - Walter Kehowski, Jun 24 2006
For all primes p > 3, we have p^2 == 1 (mod m) for m dividing 24 (and only these m). Using a covering argument, it is not hard to show that all terms except a(24k+13) are nonsquares. Hence in the search for square a(n), only 1 out of every 24 terms needs to be checked. - T. D. Noe, Jan 23 2008

Crossrefs

Partial sums of A001248.
Cf. A007504 (sum of the first n primes).

Programs

  • Haskell
    a024450 n = a024450_list !! (n-1)
    a024450_list = scanl1 (+) a001248_list
    -- Reinhard Zumkeller, Jun 08 2015
    
  • Magma
    [&+[NthPrime(k)^2: k in [1..n]]: n in [1..40]]; // Vincenzo Librandi, Oct 11 2018
    
  • Magma
    [n le 1 select 4 else Self(n-1) + NthPrime(n)^2: n in [1..80]]; // G. C. Greubel, Jan 30 2025
    
  • Maple
    A024450:=n->add(ithprime(i)^2, i=1..n); seq(A024450(n), n=1..100); # Wesley Ivan Hurt, Nov 09 2013
  • Mathematica
    Table[ Sum[ Prime[k]^2, {k, 1, n} ], {n, 40} ]
    Accumulate[Prime[Range[40]]^2] (* Harvey P. Dale, Apr 16 2013 *)
  • PARI
    s=0;forprime(p=2,1e3,print1(s+=p^2", ")) \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    a(n) = norml2(primes(n)); \\ Michel Marcus, Nov 26 2020
    
  • Python
    from sympy import prime, primerange
    def a(n): return sum(p*p for p in primerange(1, prime(n)+1))
    print([a(n) for n in range(1, 40)]) # Michael S. Branicky, Apr 13 2021

Formula

a(n) = A007504(n)^2 - 2*A024447(n). - Alexander Adamchuk, Jun 15 2006
a(n) = Sum_{i=1..n} prime(i)^2. - Walter Kehowski, Jun 24 2006
a(n) = (1/3)*n^3*log(n)^2 + O(n^3*log(n)*log(log(n))). The proof is similar to proof for A007504(n) (see link of Shevelev). - Vladimir Shevelev, Aug 02 2013
a(n) = a(n-1) + prime(n)^2, with a(1) = 4. - G. C. Greubel, Jan 30 2025

A098561 Numbers n such that the sum of the squares of the first n primes is prime.

Original entry on oeis.org

2, 18, 26, 36, 68, 78, 144, 158, 164, 174, 192, 212, 216, 236, 264, 288, 294, 338, 344, 356, 384, 404, 416, 426, 500, 516, 518, 522, 534, 540, 548, 614, 678, 680, 782, 858, 866, 876, 878, 896, 900, 912, 950, 974, 996, 1064, 1080, 1082, 1100, 1122, 1158, 1160
Offset: 1

Views

Author

Rick L. Shepherd, Sep 14 2004

Keywords

Comments

a(n) must clearly be even.

Examples

			2 is a term as the sum of the squares of the first two primes is 2^2 + 3^2 = 13, which is prime.
		

Crossrefs

Cf. A098562 (corresponding primes), A024450 (sums of squares of primes), A098563 (sums of cubes of primes), A013916 (sums of primes).

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[Sum[Prime[i]^2, {i, #}]] &] (* Carl Najafi, Aug 22 2011 *)

A117503 Primes among partial sums of floor(Pi*prime(k)), k=1,2,3,....

Original entry on oeis.org

613, 6229, 7607, 9679, 46133, 61469, 69191, 120067, 211663, 285049, 316697, 354323, 402371, 444979, 481109, 490313, 532709, 993907, 1055543, 1083721, 1237487, 1329701, 1409977, 1442899, 1484671, 1656199, 1700471, 1874767
Offset: 1

Views

Author

Enoch Haga, Mar 25 2006

Keywords

Comments

Modeled on the same concept as cumulative sums of squared primes in A098562.

Crossrefs

Programs

  • Maple
    Digits := 30 ; A117503 := proc(nmax) local a,pisum,p ; a := [] ; pisum := 0 ; p :=1 ; while nops(a) <=nmax do while true do pisum := pisum+floor(Pi*ithprime(p)) ; p := p+1 ; if isprime(pisum) then a := [op(a),pisum] ; break ; fi ; od : od : RETURN(a) ; end: a := A117503(30) ; # R. J. Mathar, Oct 26 2006
  • Mathematica
    Select[Accumulate[Floor[Pi Prime[Range[800]]]],PrimeQ] (* Harvey P. Dale, Jun 06 2022 *)
  • UBASIC
    10 Ct=1
    20 B=nxtprm(B)
    30 C=int(pi(B))
    40 D=D+C
    41 print Ct,B,C,D
    50 if D=prmdiv(D) then print D:stop
    55 Ct=Ct+1
    60 goto 20

Formula

Define the sequence s as s(j) = Sum_{k=1..j} floor(Pi*prime(k)) for j >= 1; then a(n) is the n-th prime in the sequence s.

Extensions

Edited by Jon E. Schoenfield, Sep 23 2018

A122209 Sum of squares of the first n^2 primes = A024450[n^2].

Original entry on oeis.org

4, 87, 1556, 13275, 65796, 239087, 710844, 1789395, 4083404, 8384727, 16156884, 29194283, 50363460, 82888311, 132264452, 204330315, 306450780, 450504551, 647579748, 913503459, 1262033828, 1725350295, 2318488092, 3072687971
Offset: 1

Views

Author

Alexander Adamchuk, Aug 25 2006

Keywords

Comments

Prime a(n) are listed in A122210[n] = {239087,29194283,13459558559,2330212120559,591302115428891,...}. Corresponding numbers n such that a(n) is a prime are listed in A122211[n] = {6,12,30,66,156,180,228,336,366,...}.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Prime[k]^2,{k,1,n^2}],{n,1,50}]
    Module[{nn=600,t},t=Accumulate[Prime[Range[nn]]^2];Table[t[[i]],{i,Range[ Floor[ Sqrt[nn]]]^2}]] (* Harvey P. Dale, Dec 21 2014 *)

Formula

a(n) = Sum[ Prime[k]^2, {k,1,n^2} ]. a(n) = A024450[n^2].

A122210 Primes in A122209[n].

Original entry on oeis.org

239087, 29194283, 13459558559, 2330212120559, 591302115428891, 1475383481009147, 6659290813076243, 78234869090622611, 134532153287171039, 1936272192837757871, 12491376574210826183, 25493310333833042507
Offset: 1

Views

Author

Alexander Adamchuk, Aug 26 2006

Keywords

Comments

Sum of squares of the first n^2 primes is A122209[n] = A024450[n^2] = {4,87,1556,13275,65796,239087,710844,1789395,4083404,8384727,16156884,29194283,...}. Corresponding numbers n such that A122209[n] is prime are listed in A122211[n] = {6,12,30,66,156,180,228,336,366,558,750,840,894,978,...}.

Crossrefs

Programs

  • Mathematica
    s=0;Do[p=Prime[n];k=Sqrt[n];s=s+p*p;If[PrimeQ[s]&&IntegerQ[k],Print[{k,n,s}]],{n,1,10^7}]

Formula

a(n) = A122209[ A122211(n) ] = A024450[ A122211(n)^2 ].

A122211 Numbers k such that the sum of squares of the first k^2 primes is a prime.

Original entry on oeis.org

6, 12, 30, 66, 156, 180, 228, 336, 366, 558, 750, 840, 894, 978, 1398, 1410, 1506, 1560, 1578, 1662, 1794, 1800, 1812, 1824, 1890, 1992, 2094, 2268, 2334, 2358, 2430, 2604, 2736, 2742, 2766, 2802, 2856, 2922, 3042, 3312, 3390, 3702, 3948, 3954, 3984, 4170, 4314
Offset: 1

Views

Author

Alexander Adamchuk, Aug 26 2006

Keywords

Comments

Corresponding primes A122209(a(n)) = A024450(a(n)^2) are listed in A122210(n) = {239087, 29194283, 13459558559, 2330212120559, ...}. All a(n) are of the form 6*m, where m = {1, 2, 5, 11, 26, 30, 38, 56, 61, 93, 125, 140, 149, 163, 233, 235, 251, 260, 263, 277, 299, 300, ...}. Because A122209(2*m-1) is an even number and A122209(3*m-1) == A122209(3*m+1) == 0 (mod 3) for m >= 1. [Edited by Jinyuan Wang, Mar 23 2020]

Crossrefs

Programs

  • Mathematica
    s=0;Do[p=Prime[n];k=Sqrt[n];s=s+p*p;If[PrimeQ[s]&&IntegerQ[k],Print[{k,n,s}]],{n,1,10^7}]

Formula

A122209(a(n)) = A024450(a(n)^2) = A122210(n).

Extensions

More terms from Jinyuan Wang, Mar 23 2020

A160359 Primes that are partial sums of squares of the odd primes.

Original entry on oeis.org

83, 373, 2393, 4723, 56383, 122701, 1789391, 1987849, 2706679, 7287991, 27833021, 41765519, 43570537, 55600477, 62283451, 67053359, 104720809, 122353547, 204330311, 347756707, 450504547, 540649093, 677774533, 715849843, 839886301
Offset: 1

Views

Author

M. F. Hasler, May 18 2009

Keywords

Comments

There is necessarily an odd number of terms in the sum a(n) = 3^2+5^2+...+p(k)^2, i.e. the index k=A160358(n)+1 of the last prime in this sum is even.

Crossrefs

Programs

  • Maple
    P:= select(isprime,[seq(i,i=3..10000,2)]):
    S:= ListTools:-PartialSums(map(`^`,P,2)):
    select(isprime,S); # Robert Israel, May 13 2024
  • Mathematica
    Select[Accumulate[Prime[Range[2,400]]^2],PrimeQ] (* Harvey P. Dale, Jul 17 2021 *)
  • PARI
    s=0; forprime( p=3,9999, isprime(s+=p^2) & print1(s","))

Formula

Equals A000040 intersect A133547.

A368850 Primes that are equal to the sum of the first k proper prime powers for some k.

Original entry on oeis.org

37, 89, 3391, 6547, 10271, 20233, 88397, 2256827, 6160597, 11073263, 14337313, 15797057, 18938809, 24514339, 28298057, 29442893, 33119963, 40078453, 118950121, 128935063, 135825923, 154641481, 209301217, 244837321, 342462997, 471596659, 498175681
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 07 2024

Keywords

Examples

			37 is a term because 37 is a prime and 37 = 4 + 8 + 9 + 16 = 2^2 + 2^3 + 3^2 + 2^4.
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Select[Range[5000000], PrimeOmega[#] > 1 && PrimePowerQ[#] &]], PrimeQ[#] &]
Showing 1-10 of 10 results.