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 141 results. Next

A128166 Numbers k such that k divides 1 + Sum_{j=1..k} prime(j)^2 = 1 + A024450(k).

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 12, 13, 26, 28, 45, 66, 174, 308, 350, 366, 417, 783, 804, 3774, 5714, 7998, 17628, 17940, 63447, 67620, 83028, 137868, 216717, 297486, 425708, 659316, 674166, 883500, 1203786, 3605052, 6778607, 9516098, 19964862, 25338586, 27771732, 70980884, 91871891, 208234138, 231967260, 238066596, 289829748, 784027092, 1078515812, 33256634230
Offset: 1

Views

Author

Alexander Adamchuk, Feb 22 2007, Feb 23 2007

Keywords

Comments

a(51) > 5.3*10^10. - Robert Price, Dec 16 2013
a(67) > 7*10^13. - Bruce Garner, May 05 2021

Crossrefs

Cf. A085450 (smallest m > 1 such that m divides Sum_{k=1..m} prime(k)^n).

Programs

  • Mathematica
    s = 1; Do[s = s + Prime[n]^2; If[ Mod[s, n] == 0, Print[n]], {n, 700000}]
    (* or *)
    Select[Range[10^4], IntegerQ[(1 + Plus@@(Prime[Range[#]]^2))/#] &] (* Alonso del Arte, Jan 20 2011 *)

Extensions

More terms from Sean A. Irvine, Jan 20 2011
a(45)-a(50) from Robert Price, Dec 16 2013

A122136 Numerator of Sum[ Prime[k]^2, {k,1,n}] / Product[ Prime[k], {k,1,n}] = Numerator[ A024450[n] / A002110[n] ].

Original entry on oeis.org

2, 13, 19, 29, 104, 29, 111, 79, 778, 47, 73, 163, 1068, 359, 5233, 885, 142, 20477, 219, 811, 2524, 13859, 2203, 56387, 10966, 75997, 3331, 6537, 54968, 1, 23139, 4457, 87382, 681, 15449, 239087, 108, 58061, 159097, 116041, 1882, 995, 74901, 7487
Offset: 1

Views

Author

Alexander Adamchuk, Aug 21 2006

Keywords

Comments

a(n) = 1 for n = {30,123,195,214,248,300,304,335,343,350,364,367,414,443,543,570,579,584,590,612,671,691,...} = A122137. a(n) is prime for n = {1,2,3,4,6,8,10,11,12,14,15,18,20,22,23,26,27,32,36,...} = A122138. Prime a(n) are listed in A122139 = {2,13,19,29,29,79,47,73,163,359,5233,20477,811,13859,2203,75997,3331,...}.

Crossrefs

Programs

  • Mathematica
    Table[Numerator[Sum[Prime[k]^2,{k,1,n}]/Product[Prime[k],{k,1,n}]],{n,1,100}]

Formula

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

A122137 Indices n such that A122136[n] = 1, or A024450[n] divides A002110[n].

Original entry on oeis.org

30, 123, 195, 214, 248, 300, 304, 335, 343, 350, 364, 367, 414, 443, 543, 570, 579, 584, 590, 612, 671, 691, 706, 707, 734, 780, 791, 799, 806, 810, 827, 836, 852, 880, 938, 960, 976, 1015, 1055, 1147, 1168, 1190, 1195, 1199, 1200, 1210, 1230, 1231, 1250
Offset: 1

Views

Author

Alexander Adamchuk, Aug 21 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Do[f=Numerator[Sum[Prime[k]^2,{k,1,n}]/Product[Prime[k],{k,1,n}]];If[f==1,Print[n]],{n,1,10000}]

Formula

A122136[ a(n) ] = 1.

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].

A269931 Integers n such that the sum of squares of the first n primes (A024450) is the sum of 4 but no fewer nonzero squares.

Original entry on oeis.org

4, 12, 20, 28, 29, 36, 44, 49, 52, 57, 60, 68, 73, 76, 84, 92, 100, 105, 108, 116, 124, 132, 140, 148, 153, 156, 161, 164, 172, 180, 188, 189, 196, 201, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 281, 284, 289, 292, 300, 308, 316, 324, 329, 332, 340, 345, 348, 356, 364, 372
Offset: 1

Views

Author

Altug Alkan, Mar 08 2016

Keywords

Comments

Terms that are not divisible by 4 are 29, 49, 57, 73, 105, 153, 161, 189, 201, 281, 289, 329, 345, 373, 385, 409, 417, 449, 457, 529, 553, 617, 633, 641, 645, ...
Corresponding values of sum of squares of the first n primes are 87, 4727, 30007, 98055, 109936, 239087, 486655, 710844, 874695, 1203356, 1432487, 2210983, 2841372, 3270831, ...

Examples

			4 is a term because 2^2 + 3^2 + 5^2 + 7^2 = 87 and 87 = x^2 + y^2 + z^2 has no solution for integer x, y and z.
5 is not a term because 2^2 + 3^2 + 5^2 + 7^2 + 11^2 = 208 = 8^2 + 12^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 372, Nand[SquaresR[4, #] > 1, Or[SquaresR[3, #] > 1, SquaresR[2, #] > 1, IntegerQ@ Sqrt@ #]] &@ Total[Prime[Range@ #]^2] &] (* Michael De Vlieger, Mar 08 2016 *)
  • PARI
    isA004215(n)= my(fouri, j) ; fouri=1 ; while( n >=7*fouri, if( n % fouri ==0, j= n/fouri-7 ; if( j % 8==0, return(1) ) ; ); fouri *= 4 ; ) ; return(0) ;
    a024450(n) = sum(k=1, n, prime(k)^2);
    for(n=1, 1e3, if(isA004215(a024450(n)), print1(n, ", ")));
    
  • PARI
    list(lim)=my(v=List(),n,s); forprime(p=2,, s+=p^2; if(n++>lim, return(Vec(v))); if(s\4^valuation(s, 4)%8==7, listput(v,n))) \\ Charles R Greathouse IV, Mar 08 2016

A001248 Squares of primes.

Original entry on oeis.org

4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 18769, 19321, 22201, 22801, 24649, 26569, 27889, 29929, 32041, 32761, 36481
Offset: 1

Views

Author

Keywords

Comments

Also 4, together with numbers n such that Sum_{d|n}(-1)^d = -A048272(n) = -3. - Benoit Cloitre, Apr 14 2002
Also, all solutions to the equation sigma(x) + phi(x) = 2x + 1. - Farideh Firoozbakht, Feb 02 2005
Unique numbers having 3 divisors (1, their square root, themselves). - Alexandre Wajnberg, Jan 15 2006
Smallest (or first) new number deleted at the n-th step in an Eratosthenes sieve. - Lekraj Beedassy, Aug 17 2006
Subsequence of semiprimes A001358. - Lekraj Beedassy, Sep 06 2006
Integers having only 1 factor other than 1 and the number itself. Every number in the sequence is a multiple of 1 factor other than 1 and the number itself. 4 : 2 is the only factor other than 1 and 4; 9 : 3 is the only factor other than 1 and 9; and so on. - Rachit Agrawal (rachit_agrawal(AT)daiict.ac.in), Oct 23 2007
The n-th number with p divisors is equal to the n-th prime raised to power p-1, where p is prime. - Omar E. Pol, May 06 2008
There are 2 Abelian groups of order p^2 (C_p^2 and C_p x C_p) and no non-Abelian group. - Franz Vrabec, Sep 11 2008
Also numbers n such that phi(n) = n - sqrt(n). - Michel Lagneau, May 25 2012
For n > 1, n is the sum of numbers from A006254(n-1) to A168565(n-1). - Vicente Izquierdo Gomez, Dec 01 2012
A078898(a(n)) = 2. - Reinhard Zumkeller, Apr 06 2015
Let r(n) = (a(n) - 1)/(a(n) + 1); then Product_{n>=1} r(n) = (3/5) * (4/5) * (12/13) * (24/25) * (60/61) * ... = 2/5. - Dimitris Valianatos, Feb 26 2019
Numbers k such that A051709(k) = 1. - Jianing Song, Jun 27 2021

Crossrefs

Programs

Formula

n such that A062799(n) = 2. - Benoit Cloitre, Apr 06 2002
A000005(a(n)^(k-1)) = A005408(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007
a(n) = A000040(n)^(3-1)=A000040(n)^2, where 3 is the number of divisors of a(n). - Omar E. Pol, May 06 2008
A000005(a(n)) = 3 or A002033(a(n)) = 2. - Juri-Stepan Gerasimov, Oct 10 2009
A033273(a(n)) = 3. - Juri-Stepan Gerasimov, Dec 07 2009
For n > 2: (a(n) + 17) mod 12 = 6. - Reinhard Zumkeller, May 12 2010
A192134(A095874(a(n))) = A005722(n) + 1. - Reinhard Zumkeller, Jun 26 2011
For n > 2: a(n) = 1 (mod 24). - Zak Seidov, Dec 07 2011
A211110(a(n)) = 2. - Reinhard Zumkeller, Apr 02 2012
a(n) = A087112(n,n). - Reinhard Zumkeller, Nov 25 2012
a(n) = prime(n)^2. - Jon E. Schoenfield, Mar 29 2015
Product_{n>=1} a(n)/(a(n)-1) = Pi^2/6. - Daniel Suteu, Feb 06 2017
Sum_{n>=1} 1/a(n) = P(2) = 0.4522474200... (A085548). - Amiram Eldar, Jul 27 2020
From Amiram Eldar, Jan 23 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = zeta(2)/zeta(4) = 15/Pi^2 (A082020).
Product_{n>=1} (1 - 1/a(n)) = 1/zeta(2) = 6/Pi^2 (A059956). (End)

A050248 Integer averages of first k primes for some k.

Original entry on oeis.org

2, 38, 110, 3066, 60020, 740282, 2340038, 29380602, 957565746, 31043311588, 569424748566, 7207204117608, 10871205353578, 196523412770096, 2665506690112870, 122498079071529726
Offset: 1

Views

Author

Keywords

Comments

a(10) and a(11) were found by Giovanni Resta (Nov 15 2004). He states that there are no other terms for primes p < 4011201392413. See link to Prime Puzzles, Puzzle 31 below.
a(13) > (sum of first pi(2*10^13) primes)/pi(2*10^13). - Donovan Johnson, Aug 23 2010
a(16) > 2688482385366706. - Bruce Garner, Mar 06 2021
a(17) > 125237452139872271. - Paul W. Dyson, Sep 26 2022

Examples

			38 is average of first k = 23 primes; 110 (k = 53); 3066 (k = 853); 60020 (k = 11869).
		

Crossrefs

Cf. A085450 (smallest m > 1 such that m divides Sum_{k=1..m} prime(k)^n).

Programs

  • Mathematica
    a=0;lst={};Do[p=Prime[n];a+=p;If[a/n==IntegerPart[a/n],AppendTo[lst,a/n]],{n,10!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 05 2009 *)
    Module[{nn=10^6,prs},prs=Prime[Range[nn]];Select[Table[Mean[Take[prs,n]],{n,nn}],IntegerQ]] (* The program generates the first 7 terms of the sequence. *) (* Harvey P. Dale, Jun 12 2024 *)
  • PARI
    s=n=0;forprime(p=2,1e9,if((s+=p)%n++==0, print1(s/n", "))) \\ Charles R Greathouse IV, Nov 07 2014

Formula

a(n) = A050247(n)/A045345(n).

Extensions

Edited by N. J. A. Sloane at the suggestion of David W. Wilson, Jun 23 2007
a(10)-a(11) from Giovanni Resta via Ray Chandler, Jul 19 2010
a(12) from Donovan Johnson, Aug 23 2010
a(13) from Robert Price, Mar 17 2013
a(14)-a(15) from Bruce Garner, Mar 06 2021
a(16) from Paul W. Dyson, Sep 26 2022

A111441 Numbers k such that the sum of the squares of the first k primes is divisible by k.

Original entry on oeis.org

1, 19, 37, 455, 509, 575, 20597, 202717, 1864637, 542474231, 1139733677, 51283502951, 230026580777, 22148897608321, 51271840444039, 1820988137264459
Offset: 1

Views

Author

Stefan Steinerberger, Nov 14 2005

Keywords

Comments

a(16) > 10^14 if it exists. - Anders Kaseorg, Dec 02 2020
Conjecture: There are no terms that are 3 or 9 modulo 12. This seems to hold for all related sequences with even powers of primes, not just squares. Compare "sums of powers of primes divisibility sequences", linked below. - Daniel Bamberger, Dec 03 2020
From Jacob Christian Munch-Andersen, Dec 13 2020: (Start)
Any prime except 3 raised to the 2nd power is 1 modulo 3. Therefore adding the squared primes together results in a simple periodic pattern modulo 3. Any term that is 0 modulo 3 would imply that it divides a number that is 2 modulo 3; as this is impossible there cannot be any terms divisible by 3.
The same proof indeed holds for similar lists generated with any even power, and a similar proof for instance disqualifies any multiple of 5 from the similar 4th-power list. A slightly simpler similar proof shows that there are no terms divisible by 2.
(End)
The previous comment implies that for a list generated with the m-th power, there are no terms divisible by p when p is prime and p-1 is a divisor of m. For example, the 12th power list has no terms divisible by 2, 3, 5, 7 or 13. - Paul W. Dyson, Jan 09 2021
The periodic pattern of the sum of primes raised to an even power as described in the comments above follows from Fermat's little theorem. When the pattern is periodic for a given p it can be seen that when k mod p = 0 the sum mod p = p-1 and therefore sum mod k cannot be 0. - Bruce Garner, Apr 08 2021
a(2) is also a value in each of the lists generated with the powers 20, 38, 56... . a(3) is also a value in each of the lists generated with the powers 38, 74, 110... . In general, if the sum of the first k primes each to the power of m is divisible by k, and m >= the maximum exponent in the prime factorization of k, then the sum of the first k primes each to the power of m + j * psi(k) is also divisible by k, where psi(k) is the reduced totient function (A002322) and j is any positive integer. This follows from the fact that n^m == n^(m + psi(k)) (mod k) for all integers n and all integers m >= the maximum exponent in the prime factorization of k. - Paul W. Dyson, Dec 09 2022
a(17) > 8*10^15. - Paul W. Dyson, Jan 16 2025

Examples

			The sum of the squares of the first 19 primes 2^2 + 3^2 + 5^2 + ... + 67^2 = 19*1314, thus 19 is in the sequence.
		

Crossrefs

Cf. also A217599, A217600 for the corresponding prime numbers and sums.

Programs

  • Mathematica
    s = 0; t = {}; Do[s = s + Prime[n]^2; If[ Mod[s, n] == 0, AppendTo[t, n]], {n, 10^6}]; t (* Robert G. Wilson v, Nov 15 2005 *)
    Module[{nn=2*10^6,pr2},pr2=Accumulate[Prime[Range[nn]]^2];Select[Thread[{Range[nn],pr2}],Divisible[#[[2]],#[[1]]]&]][[;;,1]] (* The program generates the first 9 terms of the sequence. *) (* Harvey P. Dale, May 25 2025 *)
  • MuPAD
    a := 0; for n from 1 to 100000 do a := a + ithprime(n)^2; if a/n = trunc(a/n) then print(n); end_if; end_for;
    
  • PARI
    for(n=1, 2*10^11, m=n; s=0; while(m>0, s=s+prime(m)^2; m--); if(s%n==0, print1(n, ", "))) \\ Felix Fröhlich, Jul 07 2014
    
  • PARI
    isok(n) = norml2(primes(n)) % n == 0; \\ Michel Marcus, Nov 25 2020

Extensions

a(8)-a(9) from Robert G. Wilson v, Nov 15 2005
a(10)-a(11) from Ryan Propper, Mar 27 2007
a(12) from Robert Price, Mar 19 2013
a(13) from Balázs Dura-Kovács, Nov 25 2020
a(14) from Balázs Dura-Kovács, Nov 30 2020
a(15) from Anders Kaseorg, Dec 02 2020
a(16) from Jonas Lippuner, Aug 23 2021

A050247 a(n) is the sum of the first A045345(n) primes.

Original entry on oeis.org

2, 874, 5830, 2615298, 712377380, 86810649294, 794712005370, 105784534314378, 92542301212047102, 82704567079549985700, 24733255676526572596026, 3612032130800990065125528, 8102184022428756416738378
Offset: 1

Views

Author

Keywords

Comments

a(10) and a(11) were found by Giovanni Resta (Nov 15 2004). He states that there are no other terms for primes p < 4011201392413. See link to Prime Puzzles, Puzzle 31 below.
a(13) > 6640510710493148698166596 (sum of first pi(2*10^13) primes). - Donovan Johnson, Aug 23 2010
a(16) > 416714769731839517991408161209 (sum of first pi(1.55*10^14) primes). - Bruce Garner, Mar 06 2021
a(17) > 814043439429001245436559390420866 (sum of first 6500000004150767 primes). - Paul W. Dyson, Sep 27 2022

Crossrefs

Cf. A085450 (smallest m > 1 such that m divides Sum_{k=1..m} prime(k)^n).

Programs

Formula

a(n) = Sum_{i=1..A045345(n)} A000040(i). - R. J. Mathar, Jan 26 2008

Extensions

a(10)-a(11) from Giovanni Resta submitted by Ray Chandler, Jul 19 2010
a(12) from Donovan Johnson, Aug 23 2010
a(13) from Robert Price, Mar 17 2013

A171399 Prime(k), where k is such that (Sum_{i=1..k} prime(i)) / k is an integer.

Original entry on oeis.org

2, 83, 241, 6599, 126551, 1544479, 4864121, 60686737, 1966194317, 63481708607, 1161468891953, 14674403807731, 22128836547913, 399379081448429, 5410229663058299, 248264241666057167
Offset: 1

Views

Author

Jaroslav Krizek, Dec 07 2009

Keywords

Comments

Corresponding values of k, Sum_{i=1..k} p_i, and (Sum_{i=1..k} p_i) / k are given in A045345, A050247 and A050248. No other solutions for p_k < 4011201392413.
a(13) > 2*10^13. - Donovan Johnson, Aug 23 2010
a(16) > 5456843462009647. - Bruce Garner, Mar 06 2021
a(17) > 253814097223614463. - Paul W. Dyson, Sep 26 2022

Examples

			83 is the 23rd prime and (Sum_{i=1..23} p_i) / 23 = 874 / 23 = 38 (integer), so 83 is a term.
		

Crossrefs

Cf. A085450 (smallest m > 1 such that m divides Sum_{k=1..m} prime(k)^n).

Programs

  • Mathematica
    t = {}; sm = 0; Do[sm = sm + Prime[n]; If[Mod[sm, n] == 0, AppendTo[t, Prime[n]]], {n, 100000}]; t (* T. D. Noe, Mar 19 2013 *)
  • PARI
    s=0; n=0; forprime(p=2, 1e7, s+=p; if(s%n++==0, print1(p", "))) \\ Charles R Greathouse IV, Jun 13 2012

Formula

a(n) = A000040(A045345(n)).

Extensions

a(6) corrected and a(12) from Donovan Johnson, Aug 23 2010
a(13) from Robert Price, Mar 17 2013
a(14)-a(15) from Bruce Garner, Mar 06 2021
a(16) from Paul W. Dyson, Sep 26 2022
Showing 1-10 of 141 results. Next