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 11-20 of 24 results. Next

A133540 Sum of fourth powers of five consecutive primes.

Original entry on oeis.org

17764, 46309, 129749, 259445, 536885, 1229525, 2124485, 3915125, 6610565, 9749525, 13921925, 20888885, 31132085, 42152165, 58884485, 79416485, 99924245, 126756965, 160369445, 202960565, 266078165, 341740325, 415341125, 498962405
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=17764 because 2^4+3^4+5^4+7^4+11^4=17764.
		

Crossrefs

Programs

  • Mathematica
    a = 4; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a + Prime[n + 4]^a, {n, 1, 100}]

Formula

a(n) = A133526(n) + A030514(n+4). - Michel Marcus, Nov 09 2013

A133541 Sum of fifth powers of five consecutive primes.

Original entry on oeis.org

181258, 552519, 1972133, 4445107, 10864643, 31214741, 59472599, 127396699, 240776801, 381348901, 590182759, 979749101, 1625329443, 2354069543, 3557186207, 5132070551, 6786946651, 9149078751, 12243523093, 16477457435
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=181258 because 2^5+3^5+5^5+7^5+11^5=181258.
		

Crossrefs

Programs

  • Mathematica
    a = 5; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a + Prime[n + 4]^a, {n, 1, 100}]
    Total/@Partition[Prime[Range[30]]^5,5,1] (* Harvey P. Dale, Dec 02 2017 *)

Formula

a(n) = A133527(n) + A050997(n+4). - Michel Marcus, Nov 09 2013

A133542 Sum of sixth powers of five consecutive primes.

Original entry on oeis.org

1905628, 6732373, 30869213, 77899469, 225817709, 818869469, 1701546341, 4243135181, 8946193541, 15119520701, 25303912709, 46580770157, 86195577389, 132965847509, 217102866629, 334423935221, 463593800381, 664500722261
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=1905628 because 2^6+3^6+5^6+7^6+11^6=1905628.
		

Crossrefs

Programs

  • Mathematica
    a = 6; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a + Prime[n + 4]^a, {n, 1, 100}]
    Total/@(Partition[Prime[Range[30]],5,1]^6)  (* Harvey P. Dale, Mar 13 2011 *)

Formula

a(n) = A133528(n) + A030516(n+4). - Michel Marcus, Nov 09 2013

A293395 The initial member of 5 consecutive primes whose arithmetic mean is the middle member.

Original entry on oeis.org

71, 271, 337, 431, 631, 661, 769, 1153, 1721, 1789, 2131, 2339, 2381, 2749, 2777, 3313, 3319, 3517, 3919, 4139, 4337, 4729, 4789, 4903, 4937, 4993, 5171, 5303, 5323, 5507, 5849, 5851, 6271, 6323, 6451, 6959, 6983, 7489, 7919, 8221, 8363, 8419, 9349, 9613, 9619
Offset: 1

Views

Author

K. D. Bajpai, Oct 08 2017

Keywords

Comments

3313 is the smallest term such that 3313 +- 6 are both prime.

Examples

			71 is a term because it is the initial member of 5 consecutive primes {71, 73, 79, 83, 89} and (71 + 73 + 79 + 83 + 89)/5 = 79.
271 is a term because it is the initial member of 5 consecutive primes {271, 277, 281, 283, 293} and (271 + 277 + 281 + 283 + 293)/5 = 281.
		

Crossrefs

Programs

  • Maple
    A293395:= proc(n)local a, b, c, d, e; a:=ithprime(n); b:=ithprime(n+1); c:=ithprime(n+2); d:=ithprime(n+3); e:=ithprime(n+4); if (a + b + d + e)/4 = c then RETURN (a); fi; end: seq(A293395(n), n=1..3000);
  • Mathematica
    Select[Prime@ Range[1200], #[[3]] == Mean@ Delete[#, 3] &@ NestList[NextPrime, #, 4] &] (* Michael De Vlieger, Oct 09 2017 *)
    Select[Partition[Prime[Range[1200]],5,1],Mean[#]==#[[3]]&][[;;,1]] (* Harvey P. Dale, Jul 31 2025 *)
  • PARI
    for(n=1, 1000, a=prime(n); b=prime(n+1); c=prime(n+2); d=prime(n+3); e=prime(n+4); if((a+b+d+e)/4==c, print1(a,", ")));
    
  • PARI
    list(lim)=my(v=List(),p=2,q=3,r=5,s=7); forprime(t=11,lim, if(p+q+s+t==4*r, listput(v,p)); p=q; q=r; r=s; s=t); Vec(v) \\ Charles R Greathouse IV, Oct 09 2017

Extensions

Definiyion simplified by David A. Corneth, Oct 14 2017
Examples clarified by Harvey P. Dale, Jul 31 2025

A337439 a(n) is the k-th prime, such that abs(prime(k) - Sum_{j=k-2..k+2} prime(j)/5) sets a new record.

Original entry on oeis.org

5, 7, 19, 47, 97, 109, 113, 199, 887, 1151, 1277, 1327, 9551, 11777, 14143, 15727, 19609, 25471, 31397, 156007, 360653, 370261, 492113, 1357201, 1357333, 1562051, 2010733, 4652507, 17051887, 20831323, 47326693, 47326913, 122164747, 189695893, 428045741, 436273291, 1453168433
Offset: 1

Views

Author

Hugo Pfoertner, Aug 29 2020

Keywords

Comments

A337438 are the corresponding values of k.

Examples

			List of first terms:
   a(n)  pi(a(n))  average-median
     5,      3,     3/5  = (2 + 3 + 5 + 7 + 11)/5 - 5
     7,      4,     4/5 = (3 + 5 + 7 + 11 + 13)/5 - 7
    19,      8,     6/5 = (13 + 17 + 19 + 23 + 29)/5 - 19
    47,     15,     8/5
    97,     25,   -12/5
   109,     29,    14/5
   113,     30,    22/5
   199,     46,    28/5
   887,    154,    34/5
  1151,    190,   -36/5
  1277,    206,   -38/5
  1327,    217,    12
  9551,   1183,    14
		

Crossrefs

Programs

  • PARI
    a337439(limp) = {my(p1=0,p2=2,p3=3,p4=5,p5=7,s=p1+p2+p3+p4+p5,d=0);forprime(p=11,limp, s=s-p1+p; my(dd=abs(s/5-p4)); if(dd>d,print1(p4,", ");d=dd); p1=p2;p2=p3;p3=p4;p4=p5;p5=p)};
    a337439(500000000)

Extensions

Name edited by Peter Munn, Aug 01 2025

A362465 a(n) is the least number of 2 or more consecutive signed primes whose sum equals n.

Original entry on oeis.org

3, 2, 2, 4, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3
Offset: 0

Views

Author

Karl-Heinz Hofmann, Apr 21 2023

Keywords

Comments

Inspired by a conjecture made by Carlos Rivera in 2000 (see link). Here we remove Rivera's restriction that the primes have to be smaller than n.
For every positive even n, a(n) = 2, provided there are 2 consecutive primes separated by a gap of size n. Polignac's conjecture says: "For any positive even number n, there are infinitely many prime gaps of size n." If so, a(3) is the only 4 in this sequence, as any even number of consecutive odd signed primes has an even sum.
There is also the reversed sequence for negative n with 0 as the symmetry point.
See A362466 for the first occurrences of numbers in this sequence.

Examples

			a(1) = 2: -2 + 3 = 1.
a(0) = 3: -2 - 3 + 5 = 0.
a(3) = 4:  2 + 3 + 5 - 7 = 3.
The example below for a(29) gives more detail of the general method employed.
a(29) = 5:  3 - 5 + 7 + 11 + 13 = 29.
Since any even number of consecutive odd signed primes has an even sum, we can show a(29) <> 4.
A test with all triples of consecutive signed primes up to 10^9 gave no solution for 29. The estimated lower bound for the permutation p1 + p2 - p3 is p1 - (p1 + 2)^0.525 and was never surpassed. (See Wikipedia link. "A result, due to Baker, Harman and Pintz in 2001, shows that Theta may be taken to be 0.525".) So the terms are calculated with the assumption that this is true.
		

Crossrefs

Cf. A000230, A001632, A362466 (first occurrences).

Programs

  • Python
    from sympy import primepi, sieve as prime
    import numpy
    upto = 50000                   # 5000000 good for 8 GB RAM (3 Minutes)
    primepi_of_upto, np, arr = primepi(upto), 1, []
    A362465 = numpy.zeros(upto + 1, dtype="i4")
    A362465[2:][::2] = 2           # holds if "upto" < 7 * 10^7
    for n in range(1,primepi_of_upto + 1): arr.append([prime[n]])
    while all(A362465) == 0:
        np += 1
        for k in range(0,primepi_of_upto):
            temp = []
            for i in arr[k]:
                temp.append(i + prime[k+np])
                temp.append(abs(i - prime[k+np]))
            arr[k] = set(temp)
            for n in temp:
                if n <= upto and A362465[n] == 0: A362465[n] = np
    print(list(A362465[0:100]))

Formula

a(n) = a(-n).

Extensions

Edited by Peter Munn, Aug 08 2023

A337438 a(n) is the index k of prime(k), such that abs(prime(k) - Sum_{j=k-2..k+2} prime(j)/5) sets a new record.

Original entry on oeis.org

3, 4, 8, 15, 25, 29, 30, 46, 154, 190, 206, 217, 1183, 1410, 1664, 1832, 2225, 2810, 3385, 14358, 30802, 31545, 40933, 104071, 104072, 118506, 149689, 325853, 1094422, 1319945, 2850174, 2850175, 6957876, 10539433, 22749705, 23163299, 72507381, 182837804, 415271758, 486570087
Offset: 1

Views

Author

Hugo Pfoertner, Aug 29 2020

Keywords

Comments

A337439 are the corresponding primes.

Examples

			See A337489.
		

Crossrefs

Programs

  • PARI
    \\ See A337439, replace p4 by primepi(p4) in call of print1.

Extensions

Name edited by Peter Munn, Aug 01 2025

A127492 Indices m of primes such that Sum_{k=0..2, k

Original entry on oeis.org

2, 10, 17, 49, 71, 72, 75, 145, 161, 167, 170, 184, 244, 250, 257, 266, 267, 282, 286, 301, 307, 325, 343, 391, 405, 429, 450, 537, 556, 561, 584, 685, 710, 743, 790, 835, 861, 904, 928, 953
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

Let p_0 .. p_4 be five consecutive primes, starting with the m-th prime. The index m is in the sequence if the absolute value [x^0] of the polynomial (x-p_0)*[(x-p_1)*(x-p_2) + (x-p_2)*(x-p_3) + (x-p_3)*(x-p_4)] + (x-p_1)*[(x-p_2)*(x-p_3) + (x-p_3)*(x-p_4)] + (x-p_2)*(x-p_3)*(x-p_4) is two times a prime. The correspondence with A127491: the coefficient [x^2] of the polynomial (x-p_0)*(x-p_1)*..*(x-p_4) is the sum of 10 products of a set of 3 out of the 5 primes. Here the sum is restricted to the 6 products where the two largest of the 3 primes are consecutive. - R. J. Mathar, Apr 23 2023

Crossrefs

Programs

  • Maple
    isA127492 := proc(k)
        local x,j ;
        (x-ithprime(k))* mul( x-ithprime(k+j),j=1..2)
        +(x-ithprime(k))* mul( x-ithprime(k+j),j=2..3)
        +(x-ithprime(k))* mul( x-ithprime(k+j),j=3..4)
        +(x-ithprime(k+1))* mul( x-ithprime(k+j),j=2..3)
        +(x-ithprime(k+1))* mul( x-ithprime(k+j),j=3..4)
        +(x-ithprime(k+2))* mul( x-ithprime(k+j),j=3..4) ;
        p := abs(coeff(expand(%/2),x,0)) ;
        if type(p,'integer') then
            isprime(p) ;
        else
            false ;
        end if ;
    end proc:
    for k from 1 to 900 do
        if isA127492(k) then
            printf("%a,",k) ;
        end if ;
    end do: # R. J. Mathar, Apr 23 2023
  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2] + Prime[x] Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 3] Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3] + Prime[x + 1] Prime[x + 3]Prime[x + 4] + Prime[x + 2] Prime[x + 3] Prime[x + 4])/2], AppendTo[a, x]], {x, 1, 1000}]; a
    prQ[{a_,b_,c_,d_,e_}]:=PrimeQ[(a b c+a c d+a d e+b c d+b d e+c d e)/2]; PrimePi/@Select[ Partition[ Prime[Range[1000]],5,1],prQ][[;;,1]] (* Harvey P. Dale, Apr 21 2023 *)

Extensions

Definition simplified by R. J. Mathar, Apr 23 2023
Edited by Jon E. Schoenfield, Jul 23 2023

A131686 Sum of squares of five consecutive primes.

Original entry on oeis.org

208, 373, 653, 989, 1469, 2189, 2981, 4061, 5381, 6701, 8069, 9917, 12029, 14069, 16709, 19541, 22061, 24821, 27989, 31421, 35789, 40661, 45029, 49589, 53549, 56909, 62837, 69389, 76709, 84149, 93581, 100253, 107741, 115541, 124109, 131837
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=208 because 2^2+3^2+5^2+7^2+11^2=208
		

Crossrefs

Programs

  • Mathematica
    a = 2; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a + Prime[n + 4]^a, {n, 1, 100}]

A283873 Smallest number that is the sum of n successive primes and also the sum of n successive semiprimes, n > 1.

Original entry on oeis.org

24, 749, 48, 311, 690, 251, 2706, 2773, 6504, 1081, 2162, 1753, 11356, 6223, 1392, 2303, 9838, 637, 14510, 1995, 3154, 21459, 72960, 5691, 8140, 1475, 2350, 3647, 1593, 7607, 55074, 2719, 9852, 12143, 106562, 12615, 9036, 19883, 15438, 28369, 8560, 8415, 3831
Offset: 2

Views

Author

Zak Seidov, Mar 17 2017

Keywords

Comments

The sequence is non-monotone.

Examples

			a(2) = 24 = A000040(5) + A000040(6) = 11 + 13 = A001358(4) + A001358(5) = 10 + 14,
a(3) = 749 = A000040(53) + A000040(54) + A000040(55) = 241 + 251 + 257 = A001358(79) + A001358(80) + A001358(81) = 247 + 249 + 253.
		

Crossrefs

Cf. A000040 Primes, A001358 Semiprimes, A118717 Sum of two consecutive semiprimes.
Sum of k consecutive primes: A001043 k=2, A034961 k=3, A034963 k=4, A034964 k=5, A127333 k=6, A127334 k=7, A127335 k=8, A127336 k=9, A127337 k=10, A127338 k=11, A127339 k=12.

Programs

  • Maple
    issp:= n-> is(not isprime(n) and numtheory[bigomega](n)=2):
    ithsp:= proc(n) option remember; local k; for k from 1+
            `if`(n=1, 1, ithsp(n-1)) while not issp(k) do od; k
            end:
    ps:= proc(i, j) option remember;
           ithprime(j)+`if`(i=j, 0, ps(i, j-1))
         end:
    ss:= proc(i, j) option remember;
           ithsp(j)+`if`(i=j, 0, ss(i, j-1))
         end:
    a:= proc(n) option remember; local i, j, k, l, p, s;
          i, j, k, l, p, s:= 1, n, 1, n, ps(1, n), ss(1, n);
          do if p=s then return p
           elif pAlois P. Heinz, Mar 24 2017
  • Mathematica
    sp=Select[Range[4,100000],2==PrimeOmega[#]&];pr=Prime[Range[PrimePi[Max[sp]]]];
    Table[Intersection[(Total/@Partition[pr,k,1]),Total/@Partition[sp,k,1]][[1]],{k,2,100}]

Extensions

More terms from Alois P. Heinz, Mar 24 2017
Previous Showing 11-20 of 24 results. Next