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

A128168 Numbers k such that k divides 1 + Sum_{j=1..k} prime(j)^4 = 1 + A122102(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 20, 24, 27, 30, 32, 39, 40, 45, 48, 58, 60, 80, 88, 90, 96, 100, 120, 138, 168, 180, 207, 216, 240, 328, 342, 353, 360, 456, 470, 480, 496, 564, 591, 768, 840, 1040, 1215, 1276, 1355, 1360, 1395, 1440, 1600, 2208, 2576, 2904
Offset: 1

Views

Author

Alexander Adamchuk, Feb 22 2007

Keywords

Comments

a(280) > 5*10^13. - Bruce Garner, Jun 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]^4; If[ Mod[s, n] == 0, Print[n]], {n, 17500}]

A233893 Prime(n), where n is such that (1+sum_{i=1..n} prime(i)^4) / n is an integer.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 23, 29, 37, 47, 53, 71, 89, 103, 113, 131, 167, 173, 197, 223, 271, 281, 409, 457, 463, 503, 541, 659, 787, 997, 1069, 1279, 1321, 1511, 2203, 2297, 2381, 2423, 3221, 3331, 3413, 3541, 4093, 4327, 5849, 6473, 8291, 9851, 10429, 11177
Offset: 1

Views

Author

Robert Price, Dec 17 2013

Keywords

Comments

a(280) > 1701962315686097. - Bruce Garner, Jun 05 2021

Examples

			a(6) = 13, because 13 is the 6th prime and the sum of the first 6 primes^4+1 = 46326 when divided by 6 equals 7721 which is an integer.
		

Crossrefs

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

Programs

  • Mathematica
    t = {}; sm = 1; Do[sm = sm + Prime[n]^4; If[Mod[sm, n] == 0, AppendTo[t, Prime[n]]], {n, 100000}]; t (* Derived from A217599 *)
    Module[{nn=1400,t},t=Accumulate[Prime[Range[nn]]^4]+1;Prime[#]&/@ Transpose[Select[Thread[{Range[nn],t}],IntegerQ[#[[2]]/#[[1]]]&]][[1]]](* Harvey P. Dale, Sep 06 2015 *)
  • PARI
    is(n)=if(!isprime(n),return(0)); my(t=primepi(n),s); forprime(p=2,n,s+=Mod(p,t)^4); s==0 \\ Charles R Greathouse IV, Nov 30 2013

A062022 a(n) = Sum_{k=1..n} Sum_{j=1..k} (prime(k) - prime(j))^2.

Original entry on oeis.org

0, 1, 14, 59, 256, 581, 1298, 2287, 4004, 7329, 11338, 17915, 26660, 36637, 49406, 67239, 91252, 117585, 151730, 191819, 235112, 289013, 350842, 425919, 521300, 628001, 740666, 865899, 997744, 1143501, 1345454, 1565639, 1815068, 2074761
Offset: 1

Views

Author

Amarnath Murthy, Jun 02 2001

Keywords

Examples

			a(3) = (5-2)^2 + (5-3)^2 + (3-2)^2 = 14, sum of the squared differences of all pairs of the first 3 primes.
		

Crossrefs

Programs

  • Maple
    A062022 := proc(n)
        local a,i,j ;
        a := 0 ;
        for j from 1 to n do
            for i from 1 to j-1 do
                a := a+(ithprime(j)-ithprime(i))^2 ;
            end do:
        end do:
        a ;
    end proc:
    seq(A062022(n), n=1..10); # R. J. Mathar, Oct 03 2014
  • Mathematica
    a[n_]:= a[n]= n*Sum[Prime[k]^2, {k,n}] - (Sum[Prime[j], {j,n}])^2;
    Table[a[n], {n, 50}] (* G. C. Greubel, May 04 2022 *)
  • SageMath
    @CachedFunction
    def a(n): return n*sum(nth_prime(j)^2 for j in (1..n)) - (sum(nth_prime(j) for j in (1..n)))^2
    [a(n) for n in (1..50)] # G. C. Greubel, May 04 2022

Formula

From G. C. Greubel, May 04 2022: (Start)
a(n) = a(n-1) + n*prime(n)^2 + Sum_{k=1..n} prime(k)*(prime(k) - 2*prime(n)), with a(0) = a(1) = 0.
a(n) = n*Sum_{j=1..n} prime(j)^2 - (Sum_{j=1..n} prime(j))^2 = n*A024450(n) - A007504(n)^2. (End)

Extensions

More terms from Matthew Conroy, Jun 11 2001

A065595 a(n) = (sum of first n primes)^2 - sum of squares of first n primes.

Original entry on oeis.org

0, 12, 62, 202, 576, 1304, 2698, 4902, 8444, 14244, 22242, 34082, 50236, 70704, 97118, 131886, 176844, 230524, 297658, 378314, 471608, 584104, 715410, 870982, 1057804, 1271924, 1511090, 1781586, 2080464, 2414944, 2819566, 3270206
Offset: 1

Views

Author

Terrel Trotter, Jr., Dec 01 2001

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    With[{prs=Prime[Range[40]]},Table[Total[Take[prs,n]]^2-Total[Take[ prs,n]^2], {n,40}]] (* Harvey P. Dale, Dec 04 2011 *)
  • PARI
    { a1=a2=0; for (n=1, 500, a1+=prime(n); a2+=prime(n)^2; write("b065595.txt", n, " ", a1^2 - a2) ) } \\ Harry J. Smith, Oct 23 2009

Formula

a(n) = (A007504(n))^2 - A024450(n). - R. J. Mathar, Oct 07 2011

Extensions

a(26)-a(32) from Harry J. Smith, Oct 23 2009

A081738 a(n) = Sum_{2 <= p <= n, p prime} p^2.

Original entry on oeis.org

0, 4, 13, 13, 38, 38, 87, 87, 87, 87, 208, 208, 377, 377, 377, 377, 666, 666, 1027, 1027, 1027, 1027, 1556, 1556, 1556, 1556, 1556, 1556, 2397, 2397, 3358, 3358, 3358, 3358, 3358, 3358, 4727, 4727, 4727, 4727, 6408, 6408, 8257, 8257, 8257, 8257, 10466, 10466
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2003

Keywords

Crossrefs

Programs

  • Magma
    A081738:= func< n | n eq 1 select 0 else (&+[k^2: k in PrimesInInterval(1, n)]) >;
    [A081738(n): n in [1..60]]; // G. C. Greubel, Jan 31 2025
    
  • Mathematica
    Table[Total[Prime[Range[PrimePi[n]]]^2],{n,48}] (* Stefano Spezia, Aug 22 2022 *)
  • PARI
    a(n, j=2) = if(n <= 1, return(0)); my(r=sqrtint(n)); my(V=vector(r, k, n\k)); my(F(n,j)=(subst(bernpol(j+1),x,n+1) - subst(bernpol(j+1),x,1)) / (j+1)); my(L=n\r-1); V=concat(V, vector(L, k, L-k+1)); my(T=vector(#V, k, F(V[k],j))); my(S=Map(matrix(#V,2,x,y,if(y==1,V[x],T[x])))); forprime(p=2, r, my(sp=mapget(S,p-1), p2=p*p); for(k=1, #V, if(V[k] < p2, break); mapput(S, V[k], mapget(S,V[k]) - p^j*(mapget(S,V[k]\p) - sp)))); mapget(S,n)-1; \\ Daniel Suteu, Aug 21 2022
    
  • PARI
    a(n) = norml2(primes(primepi(n))); \\ Michel Marcus, Aug 22 2022
    
  • Python
    from sympy import prime, primerange
    def A081738(n): return sum(p**2 for p in primerange(2,n+1))
    print([A081738(n) for n in range(1,61)]) # G. C. Greubel, Jan 31 2025

A122138 Indices k such that A122136(k) is a prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 11, 12, 14, 15, 18, 20, 22, 23, 26, 27, 32, 36, 38, 39, 40, 44, 47, 48, 50, 51, 52, 54, 55, 56, 58, 59, 60, 64, 66, 68, 71, 72, 74, 76, 78, 80, 83, 84, 86, 88, 89, 90, 92, 94, 95, 96, 98, 100, 102, 103, 107, 108, 110, 112, 114, 116, 118, 120, 122, 126
Offset: 1

Views

Author

Alexander Adamchuk, Aug 21 2006

Keywords

Comments

The corresponding primes are listed in A122139.

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeQ[Numerator[Sum[Prime[k]^2,{k,1,#1}]/Product[Prime[k],{k,1,#1}]]]&]

A122139 Primes from A122136 corresponding to the indices A122138.

Original entry on oeis.org

2, 13, 19, 29, 29, 79, 47, 73, 163, 359, 5233, 20477, 811, 13859, 2203, 75997, 3331, 4457, 239087, 58061, 159097, 116041, 7487, 17929, 4547, 152657, 408787, 58313, 5563, 4783, 226199, 13729, 676763, 204641, 119293, 283979, 2210983, 7121, 433
Offset: 1

Views

Author

Alexander Adamchuk, Aug 21 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Table[Numerator[Sum[Prime[k]^2,{k,1,n}]/Product[Prime[k],{k,1,n}]],{n,1,200}],PrimeQ[ #1]&]

Formula

a(n) = A122136(A122138(n)).

A122142 Numbers m such that m divides sum of 5th powers of the first m primes A122103(m).

Original entry on oeis.org

1, 25, 837, 5129, 94375, 271465, 3576217, 3661659, 484486719, 2012535795, 31455148645, 95748332903, 145967218799, 165153427677, 21465291596581, 97698929023845
Offset: 1

Views

Author

Alexander Adamchuk, Aug 21 2006

Keywords

Comments

No other terms up to 10^8. - Stefan Steinerberger, Jun 06 2007
a(11) > 6*10^9. - Donovan Johnson, Oct 15 2012
a(13) > 10^11. - Robert Price, Mar 30 2013
a(15) > 10^12. - Paul W. Dyson, Jan 04 2021
a(16) > 2.2*10^13. - Bruce Garner, May 09 2021
a(17) > 10^14. - Paul W. Dyson, Feb 04 2022
a(17) > 10^15. - Paul W. Dyson, Nov 19 2024

Examples

			a(2) = 25 because 25 is the first number n>1 that divides A122103[n] = Sum[ Prime[k]^5, {k,1,n} ].
Mod[ A122103[25], 25] = Mod[ 2^5 + 3^5 + 5^5 + ... + 89^5 + 97^5, 25 ] = 0.
		

Crossrefs

Programs

  • Mathematica
    s = 0; t = {}; Do[s = s + Prime[n]^5; If[ Mod[s, n] == 0, AppendTo[t, n]], {n, 1000000}]; t
    Module[{nn = 4*10^6},Select[Thread[{Range[nn], Accumulate[ Prime[ Range[ nn]]^5]}], Divisible[#[[2]], #[[1]]] &]][[All, 1]] (* Generates the first 8 terms; to generate more, increase the value of nn, but the program may take a long time to run. *) (* Harvey P. Dale, Aug 26 2019 *)

Extensions

2 more terms from Stefan Steinerberger, Jun 06 2007
a(9)-a(10) from Donovan Johnson, Oct 15 2012
a(11)-a(12) from Robert Price, Mar 30 2013
a(13)-a(14) from Paul W. Dyson, Jan 04 2021
a(15) from Bruce Garner, May 09 2021
a(16) from Paul W. Dyson, Feb 04 2022

A133548 a(n) = sum of cubes of first n odd primes.

Original entry on oeis.org

27, 152, 495, 1826, 4023, 8936, 15795, 27962, 52351, 82142, 132795, 201716, 281223, 385046, 533923, 739302, 966283, 1267046, 1624957, 2013974, 2507013, 3078800, 3783769, 4696442, 5726743, 6819470, 8044513, 9339542, 10782439, 12830822, 15078913, 17650266
Offset: 1

Views

Author

Artur Jasinski, Sep 16 2007, corrected Jun 08 2008

Keywords

Examples

			a(3)=495 because 3^3+5^3+7^3=495.
		

Crossrefs

Programs

  • Mathematica
    c = 3; a = {}; b = 0; Do[b = b + Prime[n]^c; AppendTo[a, b], {n, 2, 1000}]; a
    Accumulate[Prime[Range[2,40]]^3] (* Harvey P. Dale, Oct 31 2024 *)
  • PARI
    a(n) = sum(i=2, n+1, prime(i)^3); \\ Michel Marcus, Nov 05 2013

Formula

a(n) = A098999(n+1) - 8.

Extensions

More terms from Michel Marcus, Nov 05 2013

A133550 Sum of fifth powers of n odd primes.

Original entry on oeis.org

243, 3368, 20175, 181226, 552519, 1972376, 4448475, 10884818, 31395967, 60025118, 129369075, 245225276, 392233719, 621578726, 1039774219, 1754698518, 2599294819, 3949419926, 5753649277, 7826720870, 10903777269, 14842817912
Offset: 1

Views

Author

Artur Jasinski, Sep 16 2007

Keywords

Examples

			a(2)=3368 because 3^5+5^5 = 3368.
		

Crossrefs

Programs

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

Formula

a(n) = A122103(n+1)-32.
Previous Showing 31-40 of 141 results. Next