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.

Previous Showing 21-30 of 141 results. Next

A024447 Sum of the products of the primes taken 2 at a time from the first n primes.

Original entry on oeis.org

0, 6, 31, 101, 288, 652, 1349, 2451, 4222, 7122, 11121, 17041, 25118, 35352, 48559, 65943, 88422, 115262, 148829, 189157, 235804, 292052, 357705, 435491, 528902, 635962, 755545, 890793, 1040232, 1207472, 1409783, 1635103, 1888690, 2165022, 2481945
Offset: 1

Views

Author

Keywords

Comments

a(n) is the 2nd elementary symmetric function of the first n+1 primes.
Using the identity that (x_1 + x_2 + ... + x_n)^2 - (x_1^2 + x_2^2 + ... + x_n^2) is the sum of the products taken two at a time, a(n) can be expressed with the sum of the primes and the sum of the prime squared. Since they both have asymptotic formulas, this yields an asymptotic formula for this sequence. - Timothy Varghese, May 06 2014

Crossrefs

Programs

  • Maple
    Primes:= [seq](ithprime(i),i=1..100):
    (map(`^`,ListTools:-PartialSums(Primes),2) - ListTools:-PartialSums(map(`^`,Primes,2)))/2; # Robert Israel, Sep 24 2015
  • Mathematica
    a[1] = 0; a[n_] := a[n] = a[n-1] + Prime[n]*Total[Prime[Range[n-1]]];
    Array[a, 35] (* Jean-François Alcover, Feb 28 2019 *)
  • PARI
    /* Extra memory allocation could be required. */
    Primes=List();
    forprime(x=2,prime(500000),listput(Primes,x));
    /* Keep previous lines global, before a(n) */
    a(n)={my(p=vector(n,j,Primes[j]),s=0);forvec(y=vector(2,i,[1,#p]),s+=(p[y[1]]*p[y[2]]),2);s} \\ R. J. Cano, Oct 11 2015

Formula

a(1) = 0, a(n+1) = prime(n+1)*(sum of first n primes) + a(n), for n > 1.
a(n) = ((A007504(n))^2 - A024450(n))/2. - Timothy Varghese, May 06 2014
a(n) ~ (3*n^4*log^2(n) - 4*n^3*log^2(n))/24. - Timothy Varghese, May 06 2014

A048261 Numbers that are the sum of the squares of distinct primes.

Original entry on oeis.org

4, 9, 13, 25, 29, 34, 38, 49, 53, 58, 62, 74, 78, 83, 87, 121, 125, 130, 134, 146, 150, 155, 159, 169, 170, 173, 174, 178, 179, 182, 183, 194, 195, 198, 199, 203, 204, 207, 208, 218, 222, 227, 231, 243, 247, 252, 256, 289, 290, 293, 294, 298, 299, 302, 303
Offset: 1

Views

Author

Keywords

Comments

17163 is the largest of 2438 positive integers that can't be expressed as the sum of squares of distinct primes. See A121518. - T. D. Noe, Aug 04 2006

Examples

			13 = 2^2 + 3^2.
		

References

  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, entry 17163.

Crossrefs

Cf. A024450 (sum of squares of the first n primes).

Programs

  • Mathematica
    nn=10; s={0}; Do[p=Prime[n]; s=Union[s,s+p^2], {n,nn}]; s=Select[s,0<#<=Prime[nn]^2&] (* T. D. Noe, Aug 04 2006 *)

Formula

It is easy to check that these 2438 numbers that are not the sum of distinct primes squared are all of the form sum_i e_i*q_i where e_i is 1 or -1 and the q_i's are distinct primes. - W. Edwin Clark, Oct 19 2003

A122103 Sum of the fifth powers of the first n primes.

Original entry on oeis.org

32, 275, 3400, 20207, 181258, 552551, 1972408, 4448507, 10884850, 31395999, 60025150, 129369107, 245225308, 392233751, 621578758, 1039774251, 1754698550, 2599294851, 3949419958, 5753649309, 7826720902, 10903777301, 14842817944
Offset: 1

Views

Author

Alexander Adamchuk, Aug 20 2006

Keywords

Comments

a(n) is prime for n = {66, 148, 150, 164, 174, 214, 238, 264, 312, 328, 354, 440, 516, 536, 616, 624, 724, 744, 774, 836, 940, ...} = A122125. Primes of this form are listed in A122126 = {32353461605953, 9874820441996857, 10821208357045699, ...}.

Examples

			a(2) = 275 because the first two primes are 2 and 3, the fifth powers of which are 32 and 243, and 32 + 243 = 275.
a(3) = 3400, because the third prime is 5, its fifth power if 3125 and 275 + 3125 = 3400.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Prime[k]^5, {k, n}], {n, 100}]
  • PARI
    a(n)=sum(i=1,n,prime(i)) \\ Charles R Greathouse IV, Nov 30 2013

Formula

a(n) = sum(k = 1 .. n, prime(k)^5).
a(n) = 1/6*n^6*log(n)^5 + O(n^6*log(n)^4*log(log(n))). The proof is similar to proof for A007504(n) (see link of Shevelev). For a generalization, see comment in A122102. - Vladimir Shevelev, Aug 14 2013

A133547 a(n) = sum of squares of first n odd primes.

Original entry on oeis.org

9, 34, 83, 204, 373, 662, 1023, 1552, 2393, 3354, 4723, 6404, 8253, 10462, 13271, 16752, 20473, 24962, 30003, 35332, 41573, 48462, 56383, 65792, 75993, 86602, 98051, 109932, 122701, 138830, 155991, 174760, 194081, 216282, 239083, 263732
Offset: 1

Views

Author

Artur Jasinski, Sep 16 2007

Keywords

Examples

			a(3)=83 because 3^2+5^2+7^2=83.
		

Crossrefs

Programs

  • Mathematica
    c = 2; a = {}; b = 0; Do[b = b + Prime[n]^c; AppendTo[a, b], {n, 2, 1000}]; a

Formula

a(n) = A024450(n+1)-4. - Jason Yuen, Sep 23 2024

A024525 a(n) = 1^2 + prime(1)^2 + prime(2)^2 + ... + prime(n)^2.

Original entry on oeis.org

1, 5, 14, 39, 88, 209, 378, 667, 1028, 1557, 2398, 3359, 4728, 6409, 8258, 10467, 13276, 16757, 20478, 24967, 30008, 35337, 41578, 48467, 56388, 65797, 75998, 86607, 98056, 109937, 122706, 138835, 155996, 174765, 194086, 216287, 239088, 263737, 290306, 318195, 348124
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A024450.
Partial sums of A280076.

Programs

  • Magma
    [1] cat [n le 1 select 5 else Self(n-1) + NthPrime(n)^2: n in [1..80]]; // G. C. Greubel, Jan 30 2025
    
  • Mathematica
    Join[{1},Accumulate[Prime[Range[40]]^2]+1] (* Harvey P. Dale, Oct 24 2015 *)
  • Python
    def A024525(n):
        if n<2: return (1,5)[n]
        else: return A024525(n-1) + nth_prime(n)**2
    print([A024525(n) for n in range(81)]) # G. C. Greubel, Jan 30 2025

Formula

a(n) = 1 + A024450(n), for n >= 1.
a(n) = a(n-1) + prime(n)^2, with a(0) = 1, a(1) = 5. - G. C. Greubel, Jan 30 2025

Extensions

Corrected by Harvey P. Dale, Oct 24 2015

A127719 Floor of square root of sum of squares of n consecutive primes.

Original entry on oeis.org

2, 3, 6, 9, 14, 19, 25, 32, 39, 48, 57, 68, 80, 90, 102, 115, 129, 143, 158, 173, 187, 203, 220, 237, 256, 275, 294, 313, 331, 350, 372, 394, 418, 440, 465, 488, 513, 538, 564, 590, 616, 642, 670, 697, 724, 751, 780, 811, 843, 873
Offset: 1

Views

Author

Artur Jasinski, Jan 25 2007

Keywords

Crossrefs

Programs

  • Maple
    A024450 := proc(n) local i; add((ithprime(i))^2,i=1..n); end: A000196 := proc(n) floor(sqrt(n)); end: A127719 := proc(n) A000196(A024450(n)); end: for n from 1 to 30 do printf("%d, ",A127719(n)); od; # R. J. Mathar, Jan 28 2007
  • Mathematica
    a = {}; k = 0; Do[k = k + (Prime[x])^2; AppendTo[a, Floor[Sqrt[k]]], {x, 1, 50}]; a

Formula

a(n) = A000196(A024450(n)). - R. J. Mathar, Jan 28 2007

A127720 Floor of square root of sum of squares of n odd consecutive primes.

Original entry on oeis.org

3, 5, 9, 14, 19, 25, 31, 39, 48, 57, 68, 80, 90, 102, 115, 129, 143, 157, 173, 187, 203, 220, 237, 256, 275, 294, 313, 331, 350, 372, 394, 418, 440, 465, 488, 513, 538, 564, 590, 616, 642, 670, 697, 724, 751, 780, 811, 843, 873
Offset: 1

Views

Author

Artur Jasinski, Jan 25 2007

Keywords

Crossrefs

Programs

  • Maple
    A024450 := proc(n) local i ; add((ithprime(i))^2,i=1..n) ; end: Ax := proc(n) A024450(n+1)-4 ; end: A000196 := proc(n) floor(sqrt(n)) ; end: A127720 := proc(n) A000196(Ax(n)) ; end: for n from 1 to 30 do printf("%d, ",A127720(n)) ; od ; # R. J. Mathar, Jan 28 2007
  • Mathematica
    a = {}; k = 0; Do[k = k + (Prime[x])^2; AppendTo[a, Floor[Sqrt[k]]], {x, 2, 50}]; a
    Module[{nn=50},Floor[Sqrt[#]]&/@Accumulate[Prime[Range[2,nn+1]]^2]] (* Harvey P. Dale, Jul 27 2017 *)

Formula

a(n) = A000196(A024450(n+1) - 4). - R. J. Mathar, Jan 28 2007

A059804 Consider the line segment in R^n from the origin to the point v=(2,3,5,7,11,...) with prime coordinates; let d = squared distance to this line from the closest point of Z^n (excluding the endpoints). Sequence gives d times v.v.

Original entry on oeis.org

1, 3, 9, 39, 87, 215, 391, 711, 1326, 1975, 2925, 4256, 5696, 7537, 9774, 12488, 16322, 20477, 24966, 30007, 35336, 41577, 48466, 56387, 65796, 75997, 86606, 98055, 109936, 122705, 138834, 155995, 174764, 194085, 216286, 239087, 263736, 290305
Offset: 2

Views

Author

Keywords

Comments

v.v is given by A024450(n). For n >= 19, a(n) = A024450(n-1).
Officially these are just conjectures so far.

Crossrefs

Cf. A137609 (where the minimum distance occurs along the line segment).

A077023 Integer values of sum of first k primes squared divided by k-th prime, for some k (A077022).

Original entry on oeis.org

2, 29, 284, 410066261, 941945317
Offset: 1

Views

Author

Randy L. Ekl, Zak Seidov, Oct 17 2002

Keywords

Comments

Remainder, a(n), when sum of first n primes squared is divided by n-th prime in A072004. In A077023, 5 values of n such that a(n)=0 are given. In the sequence, the corresponding integer values of sum of first n primes squared divided by n-th prime are given. For primes <100,000,000, there are no other cases of a(n)=0.

Examples

			29 is a term because A024450(6)/prime(6) = 29;
284 is a term because A024450(17)/prime(17) = 284;
410066261 is a term because A024450(11156)/prime(11156) = 410066261;
941945317 is a term because A024450(16548)/prime(16548) = 941945317.
		

Crossrefs

Formula

a(n) = A024450(A077022(n))/prime(A077022(n)). - Michel Marcus, Jan 14 2023

A125907 Numbers k such that k divides 2^4 + 3^4 + 5^4 + ... + prime(k)^4.

Original entry on oeis.org

1, 2951, 38266951, 3053263643573, 3798632877308897
Offset: 1

Views

Author

Alexander Adamchuk, Feb 04 2007

Keywords

Comments

No more terms to 10^13. - Charles R Greathouse IV, Mar 21 2011
a(4) is less than 10^13 contradicting the previous comment. It was found using the primesieve library by Kim Walisch and gmplib. - Bruce Garner, Feb 26 2021
a(6) > 4*10^15. - Paul W. Dyson, Nov 19 2024

Crossrefs

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

Programs

  • Mathematica
    a(1) = 1; s = 2^4; Do[s = s + Prime[2n]^4+Prime[2n+1]^4; If[ Mod[s, 2n+1] == 0, Print[2n+1]], {n,1, 20000000}]
  • PARI
    s=0; n=0; forprime(p=2, 4e9, s+=p^4; if(s%n++==0, print1(n", "))) \\ Charles R Greathouse IV, Mar 21 2011

Extensions

a(4) from Bruce Garner, Feb 26 2021
a(5) from Paul W. Dyson, May 09 2024
Previous Showing 21-30 of 141 results. Next