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-47 of 47 results.

A357813 a(n) is the least number k such that the sum of n^2 consecutive primes starting at prime(k) is a square.

Original entry on oeis.org

3, 1, 78, 333, 84, 499, 36, 1874, 1102, 18, 183, 2706, 23, 104, 739, 1055, 8435, 633, 42130, 13800, 942, 55693, 7449, 13270, 41410, 4317, 17167, 61999, 17117, 9161, 46704, 12447, 2679, 2971, 3946, 103089, 6359, 19601, 7240, 422, 690, 20851, 963, 36597, 3559, 111687, 12926, 4071, 30622, 6355
Offset: 2

Views

Author

Jean-Marc Rebert, Nov 12 2022

Keywords

Examples

			Define sp(k,n) to be the sum of n^2 consecutive primes starting at prime(k).
a(2) = 3 because sp(k,2) at k=3 is 5 + 7 + 11 + 13 = 36 = 6^2, a square, and no smaller k has this property.
a(3) = 1 because sp(k,3) at k=1 is 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 = 100 = 10^2, a square, and no smaller k has this property.
a(4) = 78 because sp(k,4) at k=78 is 397 + 401 + ... + 487 = 7056 = 84^2, a square, and no smaller k has this property.
		

Crossrefs

Cf. A358156. Subsequence of A230327.

Programs

  • PARI
    \\ sum of n^2 consecutive primes starting at prime(k).
    sp(k,n)=my(u=primes([prime(k),prime(k+n*n-1)]));return(vecsum(u))
    \\ Least number k such that sp(k,n) is a square.
    a(n)=my(k=1);while(!issquare(sp(k,n)),k++);k
    
  • PARI
    a(n) = { my(pr = primes(n^2), s = vecsum(pr), startprime = nextprime(pr[#pr] + 1), res = 1); pr = List(pr); forprime(p = startprime, oo, if(issquare(s), return(res); ); res++; s += (p - pr[1]); listput(pr, p); listpop(pr, 1); ) } \\ David A. Corneth, Nov 13 2022

Formula

a(n) = A230327(n^2).

A094207 a(n) = prime(4n-3) + prime(4n-2) + prime(4n-1) + prime(4n).

Original entry on oeis.org

17, 60, 120, 184, 258, 324, 408, 480, 576, 660, 744, 830, 928, 1012, 1098, 1194, 1298, 1408, 1502, 1596, 1704, 1788, 1870, 1980, 2094, 2236, 2328, 2420, 2508, 2602, 2694, 2820, 2942, 3038, 3166, 3282, 3378, 3480, 3588, 3726, 3838, 3948, 4062, 4152, 4244
Offset: 1

Views

Author

Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), May 26 2004

Keywords

Examples

			a(1) = prime(1) + prime(2) + prime(3) + prime(4) = 2 + 3 + 5 + 7 = 17.
a(2) = prime(5) + prime(6) + prime(7) + prime(8) = 11 + 13 + 17 + 19 = 60.
a(3) = prime(9) + prime(10) + prime(11) + prime(12) = 23 + 29 + 31 + 37 = 120.
		

Programs

  • Magma
    [NthPrime(4*n-3) + NthPrime(4*n-2) + NthPrime(4*n-1) + NthPrime(4*n): n in [1..50]]; // Vincenzo Librandi, Jul 25 2015
    
  • Mathematica
    f[n_] := Sum[ Prime[i], {i, 4n - 3, 4n}]; Table[ f[n], {n, 45}] (* Robert G. Wilson v, Jun 01 2004 *)
  • PARI
    vector(50, n, prime(4*n-3) + prime(4*n-2) + prime(4*n-1) + prime(4*n)) \\ Michel Marcus, Jul 25 2015

Formula

a(n) = A034963(4n-4). - R. J. Mathar, Apr 20 2009

Extensions

More terms from Robert G. Wilson v and Klaus Brockhaus, Jun 01 2004

A094932 Primes that represent some mean of 4 consecutive (2 smaller, itself, 1 larger) primes.

Original entry on oeis.org

113, 199, 317, 619, 863, 1069, 1129, 1789, 2861, 3089, 3169, 3259, 3677, 3739, 4733, 4973, 5419, 5591, 6581, 7649, 7963, 8243, 8297, 8629, 9973, 10463, 10799, 10909, 11093, 11119, 12347, 12379, 12619, 12983, 14011, 14327, 15331, 15649, 16007
Offset: 4

Views

Author

Roger L. Bagula, Jun 17 2004

Keywords

Comments

A prime number prime(n) is in the sequence if the arithmetic mean of the 4 nearby primes, measured by A034963(n-2)/4, equals one plus the prime. - R. J. Mathar, Nov 15 2019

Examples

			113 is in the list because the arithmetic mean of 107, 109, 113, and 127 is A034963(28)/4 = 456/4 = 114, and 114 = 1+113.
		

Programs

  • Mathematica
    a=Table[If[(Prime[n-3]+Prime[n-2]+Prime[n-1]+Prime[n])/4-Prime[n-1]-1==0, Prime[n-1], 0], {n, 4, 2004}] a0=Delete[Union[Sort[a]], 1]

Extensions

Definition rephrased. - R. J. Mathar, Nov 15 2019

A125270 Coefficient of x^2 in polynomial whose zeros are 5 consecutive primes starting with the n-th prime.

Original entry on oeis.org

1358, 3954, 10478, 22210, 43490, 78014, 129530, 206650, 324350, 466270, 621466, 853742, 1132130, 1436690, 1870850, 2388050, 2886370, 3440410, 4133410, 4904906, 5926654, 7195670, 8425430, 9792950, 11040910, 12098990, 13917898, 16097810
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

Sums of all distinct products of 3 out of 5 consecutive primes, starting with the n-th prime; value of 3rd elementary symmetric function on the 5 consecutive primes.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[AppendTo[a, (Prime[x] Prime[x + 1] Prime[x + 2] + Prime[x] Prime[x + 1] Prime[x + 3] + Prime[x] Prime[x + 1] Prime[x + 4] + Prime[x] Prime[x + 2] Prime[x + 3] + Prime[x] Prime[x + 2] Prime[x + 4] + Prime[x] Prime[x + 3] Prime[x + 4] + Prime[x + 1] Prime[x + 2] Prime[x + 3] + Prime[x + 1] Prime[x + 2] Prime[x + 4] + Prime[x + 1] Prime[x + 3] Prime[x + 4] + Prime[x + 2] Prime[x + 3] Prime[x + 4])], {x, 1, 100}]; a
    fcp[{p_,q_,r_,s_,t_}]:=p*q(r+s+t)+(p+q)r(s+t)+(p+q+r)s*t; fcp/@Partition[ Prime[ Range[40]],5,1] (* Harvey P. Dale, Sep 05 2014 *)

Formula

Let p = Prime(n), q = Prime(n+1), r = Prime(n+2), s = Prime(n+3) and t = Prime(n+4). Then a(n) = p q (r+s+t) + (p + q) r (s + t) + (p + q + r) s t.

Extensions

Edited and corrected by Franklin T. Adams-Watters, Jan 23 2007

A226152 Numbers n such that n^2 is an average of 4 consecutive primes.

Original entry on oeis.org

3, 9, 12, 21, 24, 35, 72, 126, 129, 179, 189, 194, 198, 214, 243, 253, 255, 279, 304, 322, 432, 443, 480, 487, 511, 523, 663, 681, 696, 699, 711, 717, 721, 734, 738, 796, 802, 838, 910, 975, 1008, 1034, 1070, 1144, 1215, 1230, 1237, 1265, 1276, 1370, 1375, 1386, 1469
Offset: 1

Views

Author

Alex Ratushnyak, May 28 2013

Keywords

Comments

Integers of the form sqrt(A102655(k)) for any k. - R. J. Mathar, Jun 06 2013

Crossrefs

Programs

  • C
    #include 
    #include 
    #include 
    #define TOP (1ULL<<30)
    int main() {
      unsigned long long i, j, p1, p2, p3, r, s;
      unsigned char *c = (unsigned char *)malloc(TOP/8);
      memset(c, 0, TOP/8);
      for (i=3; i < TOP; i+=2)
        if ((c[i>>4] & (1<<((i>>1) & 7)))==0 /*&& i<(1ULL<<32)*/)
            for (j=i*i>>1; j>3] |= 1 << (j&7);
      for (p3=2, p2=3, p1=5, i=7; i < TOP; i+=2)
        if ((c[i>>4] & (1<<((i>>1) & 7)))==0) {
          s = p3 + p2 + p1 + i;
          if (s%4==0) {
            s/=4;
            r = sqrt(s);
            if (r*r==s) printf("%llu, ", r);
          }
          p3 = p2, p2 = p1, p1 = i;
        }
      return 0;
    }
  • Maple
    A034963 := proc(n)
        add(ithprime(i), i=n..n+3) ;
    end proc:
    for n from 1 to 90000 do
        s := A034963(n)/4 ;
        if type(s,'integer') then
        if issqr(s) then
            printf("%d, ", sqrt(s)) ;
        end if;
        end if;
    end do: # R. J. Mathar, Jun 06 2013

Formula

a(n) = A051395(n)/2.

A287900 Numbers that are sums of 2,4,6,8 consecutive primes.

Original entry on oeis.org

227304, 660078, 724150, 1266696, 1571870, 2302644, 2809920, 2819160, 3863088, 4844886, 5755080, 11574906, 11882976, 14971620, 17526744, 17744130, 18886434, 22177052, 26324484, 27507192, 29899260, 31863798, 35716842, 35963850, 39851304, 41436306, 41490900
Offset: 1

Views

Author

Zak Seidov, Jun 02 2017

Keywords

Comments

Intersection of A001043, A034963, A127333 and A127335.
Positions of a(n) in A001043: {10760, 28407, 30910, 51588, 62912, 89404, 107456, 107778, 144230, 177821, 208613}.
Positions of a(n) in A034963: {5761, 15093, 16416, 27327, 33309, 47252, 56728, 56908, 76048, 93703, 109837}.
Positions of a(n) in A127333: {4004, 10452, 11355, 18899, 22983, 32581, 39092, 39211, 52346, 64499, 75556}.
Positions of a(n) in A127335: {3088, 8062, 8760, 14543, 17690, 25048, 30068, 30163, 40232, 49523, 57981}.

Crossrefs

Extensions

More terms from Alois P. Heinz, Jun 02 2017

A380433 Numbers that are a sum of both four and six consecutive prime numbers.

Original entry on oeis.org

72, 660, 724, 1788, 1956, 3300, 3348, 3528, 4280, 4520, 4920, 5064, 5250, 7764, 8412, 8598, 9210, 9378, 9456, 9920, 10134, 10974, 11256, 12054, 12762, 13830, 14106, 14184, 14294, 14826, 18180, 18600, 18876, 19380, 19922, 20344, 20900, 21636, 21728, 22286, 22608
Offset: 1

Views

Author

Andrej Jakobcic, Jan 24 2025

Keywords

Comments

All terms are even.

Examples

			72 = (13+17+19+23) = (5+7+11+13+17+19).
		

Crossrefs

Intersection of A034963 and A127333.
Previous Showing 41-47 of 47 results.