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

A157492 Apply partial sum operator twice to sequence of squares of the first n primes.

Original entry on oeis.org

4, 17, 55, 142, 350, 727, 1393, 2420, 3976, 6373, 9731, 14458, 20866, 29123, 39589, 52864, 69620, 90097, 115063, 145070, 180406, 221983, 270449, 326836, 392632, 468629, 555235, 653290, 763226, 885931, 1024765, 1180760, 1355524, 1549609
Offset: 1

Views

Author

Keywords

Crossrefs

Partial sums of A024450.

Programs

  • Maple
    ListTools:-PartialSums(ListTools:-PartialSums([seq(ithprime(i)^2,i=1..100)])); # Robert Israel, May 14 2019
  • Mathematica
    s0=s1=0;lst={};Do[p=Prime[n];s0+=p^2;s1+=s0;AppendTo[lst,s1],{n,5!}];lst
    Nest[Accumulate,Prime[Range[40]]^2,2] (* Harvey P. Dale, Jan 01 2020 *)

A223937 a(n) is the sum of the cubes of the first A122140(n) primes.

Original entry on oeis.org

8, 4696450, 7024453131396, 17761740387522, 155912686127038650, 87598780898450312031408, 2147216863131055036604400, 2908950240914054780101441371333254159676520, 384422969812280951687876430655304031054262132, 6187047308209705064673104196645071104957480508
Offset: 1

Views

Author

Robert Price, Mar 29 2013

Keywords

Crossrefs

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

Extensions

Title corrected by Hugo Pfoertner, Feb 09 2021

A240860 a(n) = Sum_{i=1..n} (-1)^{i+1} prime(i)^2, where prime(k) denotes the k-th prime: alternating sum of the squares of the first n primes.

Original entry on oeis.org

4, -5, 20, -29, 92, -77, 212, -149, 380, -461, 500, -869, 812, -1037, 1172, -1637, 1844, -1877, 2612, -2429, 2900, -3341, 3548, -4373, 5036, -5165, 5444, -6005, 5876, -6893, 9236, -7925, 10844, -8477, 13724, -9077, 15572, -10997, 16892, -13037, 19004, -13757
Offset: 1

Views

Author

Timothy Varghese, May 06 2014

Keywords

Comments

For n even this is the negative of the sum of (3^2 - 2^2) + (7^2 - 5^2) + ... + (prime(n)^2 - prime(n-1)^2). But this is half of the terms in the sum of (3^2 - 2^2) + (5^2 - 3^2) + (7^2 - 5^2) + ... + (prime(n)^2 - prime(n-1)^2) which has a sum that telescopes to prime(n)^2 - 4. Thus a good estimate of a(n) (half the terms) is prime(n)^2/2 (half the square of the n-th prime) which works well up to n = 10000. For odd n, add prime(n)^2 to the estimate for even n.

Crossrefs

Programs

  • PARI
    a(n) = sum(i=1, n, (-1)^(i+1)*prime(i)^2); \\ Michel Marcus, May 09 2014

A357251 a(n) = Sum_{1<=i<=j<=n} prime(i)*prime(j).

Original entry on oeis.org

4, 19, 69, 188, 496, 1029, 2015, 3478, 5778, 9519, 14479, 21768, 31526, 43609, 59025, 79218, 105178, 135739, 173795, 219164, 271140, 333629, 406171, 491878, 594698, 711959, 842151, 988848, 1150168, 1330177, 1548617, 1791098, 2063454, 2359107, 2698231, 3064708, 3470396, 3918157, 4404795, 4938846
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Sep 20 2022

Keywords

Comments

a(n) is the sum of products of unordered pairs of (not necessarily distinct) elements from the first n primes.
It appears that 4 is the only square in the sequence.

Examples

			a(3) = 2*2 + 2*3 + 2*5 + 3*3 + 3*5 + 5*5 = 69.
		

Crossrefs

Partial sums of A143215.
Row n=2 of A343751.

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..100)]:
    S:= ListTools:-PartialSums(P):
    ListTools:-PartialSums(zip(`*`,P,S));
  • Mathematica
    Accumulate[(p = Prime[Range[40]]) * Accumulate[p]] (* Amiram Eldar, Sep 20 2022 *)
  • Python
    from itertools import accumulate
    from sympy import prime, primerange
    def aupton(nn):
        p = list(primerange(2, prime(nn)+1))
        return list(accumulate(c*d for c, d in zip(p, accumulate(p))))
    print(aupton(40)) # Michael S. Branicky, Sep 24 2022 after Amiram Eldar

Formula

a(n) = (A007504(n)^2 + A024450(n))/2.
a(n) = A024447(n) + A024450(n).
a(n) = A065762(n)/2. - Hugo Pfoertner, Sep 24 2022

A065762 a(n) = (sum of first n primes)^2 + sum of (squares of first n primes).

Original entry on oeis.org

8, 38, 138, 376, 992, 2058, 4030, 6956, 11556, 19038, 28958, 43536, 63052, 87218, 118050, 158436, 210356, 271478, 347590, 438328, 542280, 667258, 812342, 983756, 1189396, 1423918, 1684302, 1977696, 2300336, 2660354, 3097234, 3582196, 4126908, 4718214
Offset: 1

Views

Author

Terrel Trotter, Jr., Dec 04 2001

Keywords

Examples

			a(4) = 376 because (2 + 3 + 5 + 7)^2 + (2^2 + 3^2 + 5^2 + 7^2) = 17^2 + (4 + 9 + 25 + 49) = 289 + 87 = 376.
		

Crossrefs

Programs

  • Mathematica
    nn=50;With[{prs=Prime[Range[nn]]},Table[Total[Take[prs,n]]^2+ Total[Take[prs,n]^2],{n,nn}]] (* Harvey P. Dale, Aug 20 2011 *)
  • PARI
    { s=ss=0; for (n=1, 500, p=prime(n); s+=p; ss+=p^2; write("b065762.txt", n, " ", s^2 + ss) ) } \\ Harry J. Smith, Oct 30 2009

Formula

a(n) = A007504(n)^2 + A024450(n). - Michel Marcus, Oct 12 2015

Extensions

More terms from Harvey P. Dale, Aug 20 2011

A072004 Remainder when sum of squares of first n primes is divided by n-th prime.

Original entry on oeis.org

0, 1, 3, 3, 10, 0, 3, 1, 15, 19, 10, 28, 12, 1, 32, 25, 0, 42, 42, 45, 4, 23, 77, 50, 30, 45, 86, 43, 64, 100, 23, 105, 89, 41, 87, 54, 133, 2, 59, 47, 147, 64, 174, 102, 65, 104, 7, 127, 107, 28, 210, 194, 106, 60, 159, 95, 119, 116, 104, 230, 224, 110, 183, 212, 287
Offset: 1

Views

Author

Randy L. Ekl, Jun 18 2002

Keywords

Examples

			a[3] = 3 because s[3] = 2*2 + 3*3 + 5*5 = 38, p[3]=5 and q[3]= floor(38/5)=7, so a[3] = 38-5*7 = 3.
		

Crossrefs

Cf. A024450 (s(n)).

Programs

  • Mathematica
    Mod[#[[1]],#[[2]]]&/@With[{nn=70},Thread[{Accumulate[Prime[ Range[ nn]]^2], Prime[Range[nn]]}]] (* Harvey P. Dale, Aug 09 2015 *)
  • PARI
    a(n) = sum(k=1, n, prime(k)^2) % prime(n); \\ Michel Marcus, Jan 14 2023

Formula

a(n) = s(n) - prime(n)*q(n), where s(n) = sum of squares of first n primes, prime(n) is n-th prime and q(n) is floor(s(n)/prime(n)).

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

A125826 Numbers m that divide 2^7 + 3^7 + 5^7 + ... + prime(m)^7.

Original entry on oeis.org

1, 25, 1677, 21875, 538513, 1015989, 18522325, 1130976595, 1721158369, 561122374231, 1763726985077, 2735295422833, 7631117283951, 22809199833151, 46929434362563, 49217568518075, 151990420653423, 174172511353413, 1258223430425543
Offset: 1

Views

Author

Alexander Adamchuk, Feb 03 2007

Keywords

Comments

See A232865 for prime(a(n)). - M. F. Hasler, Dec 01 2013
a(17) > 5.5*10^13. - Bruce Garner, Aug 30 2021
a(18) > 1.56*10^14. - Paul W. Dyson, Mar 02 2022
a(19) > 1.9*10^14. - Bruce Garner, Sep 18 2022

Crossrefs

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

Programs

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

Extensions

More terms from Ryan Propper, Mar 26 2007
a(8)-a(9) from Charles R Greathouse IV, Mar 16 2011
a(10) from Paul W. Dyson, Jan 05 2021
a(11)-a(12) from Bruce Garner, Feb 26 2021
a(13) from Bruce Garner, Mar 23 2021
a(14) from Bruce Garner, May 19 2021
a(15)-a(16) from Bruce Garner, Aug 30 2021
a(17) from Paul W. Dyson, Mar 02 2022
a(18) from Bruce Garner, Sep 18 2022
a(19) from Paul W. Dyson, Jan 17 2024

A125827 Numbers m that divide 2^11 + 3^11 + 5^11 + ... + prime(m)^11.

Original entry on oeis.org

1, 25, 59, 2599, 6195, 421407, 11651191, 19293221, 255136097, 1820015683, 2183556659, 7993872143, 9850779563, 2006892138335, 2649677145789, 6645858099781, 318039538085101, 414996765110825
Offset: 1

Views

Author

Alexander Adamchuk, Feb 03 2007

Keywords

Comments

a(17) > 8*10^12. - Bruce Garner, Mar 29 2021
a(19) > 5*10^14. - Paul W. Dyson, Dec 31 2024

Crossrefs

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

Programs

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

Extensions

3 more terms from Stefan Steinerberger, Jun 06 2007
1 more term from Sean A. Irvine, Jan 26 2011
a(10)-a(13) from Charles R Greathouse IV, Mar 20 2011
a(14) from Paul W. Dyson, Jan 08 2021
a(15) from Bruce Garner, Mar 08 2021
a(16) from Bruce Garner, Mar 29 2021
a(17) from Paul W. Dyson, Jan 03 2023
a(18) from Paul W. Dyson, Dec 20 2024
Previous Showing 41-50 of 141 results. Next