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.

Showing 1-10 of 11 results. Next

A072849 Prime(a(n)) + ... + prime(a(n)+3) is a square = A051395(n)^2.

Original entry on oeis.org

3, 21, 33, 84, 104, 199, 689, 1848, 1923, 3435, 3795, 3985, 4126, 4742, 5968, 6413, 6495, 7649, 8927, 9906, 16885, 17677, 20474, 20996, 22924, 23923, 36902, 38733, 40347, 40654, 41956, 42601, 43047, 44482, 44920, 51608, 52305, 56706, 66032
Offset: 1

Views

Author

Zak Seidov, Jun 21 2003

Keywords

Comments

Conjecture: this sequence and A064397 are disjoint. That is to say, prime(n) + prime(n+1) and prime(n) + prime(n+1) + prime(n+2) + prime(n+3) cannot be squares at the same time. - Jianing Song, Nov 13 2022

Examples

			a(1) = 3 because prime(3) + prime(4) + prime(5) + prime(6) = 5+7+11+13 = 36 = 6*6.
		

Crossrefs

Cf. A051395 (square root of sums), A206280 (primes), A000720.
Cf. A064397 (2 primes), A076305 (3 primes), A166255 (70 primes), A166261 (120 primes).

Programs

Formula

a(n) = A000720(A206280(n)). - Amiram Eldar, Jun 28 2024

Extensions

Definition corrected by Zak Seidov, Dec 13 2014

A245577 Numbers k such that k^4 is a sum of 4 consecutive primes.

Original entry on oeis.org

12, 90, 208, 212, 234, 242, 314, 366, 404, 410, 416, 486, 540, 590, 750, 888, 908, 1152, 1418, 1444, 1500, 1524, 1658, 1666, 1736, 1798, 1814, 1874, 1940, 1942, 2094, 2138, 2266, 2496, 2584, 3058, 3062, 3206, 3660, 4034, 4080, 4208, 4368, 4422, 4606, 4872
Offset: 1

Views

Author

Zak Seidov, Nov 29 2014

Keywords

Examples

			12^4 = 20736 = prime(689) + prime(689 + 1) + prime(689 + 2) + prime(689 + 3) = 5171 + 5179 + 5189 + 5197.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := MemberQ[ Total@# & /@ Partition[ Table[ NextPrime[n^4/4, i], {i, {-3, -2, -1, 1, 2, 3}}], 4, 1], n^4]; Select[ Range@ 5000, fQ] (* Robert G. Wilson v, Dec 03 2014 *)
  • PARI
    isscpn(n) = {np = n^4; p = precprime(np\4); for (i=1, 3, p = precprime(p-1);); while(1, q = nextprime(p+1); r = nextprime(q+1); s = nextprime(r+1); if ((v=p+q+r+s) == np, return (1)); if (v > np, return (0)); p = q;);} \\ Michel Marcus, Nov 30 2014

A226151 Numbers n such that triangular(n) is a sum of 4 consecutive primes.

Original entry on oeis.org

8, 15, 39, 56, 60, 144, 155, 203, 212, 216, 263, 388, 451, 464, 480, 555, 619, 644, 680, 723, 736, 788, 791, 799, 876, 903, 1012, 1056, 1143, 1239, 1284, 1368, 1479, 1547, 1611, 1684, 1695, 1703, 1827, 1859, 1908, 1939, 2100, 2108, 2135, 2148, 2152, 2187, 2199, 2216
Offset: 1

Views

Author

Alex Ratushnyak, May 28 2013

Keywords

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;
          r = sqrt(s*2);
          if (r*(r+1)==s*2) printf("%llu, ", r);
          p3 = p2, p2 = p1, p1 = i;
        }
      return 0;
    }
  • Maple
    istriangular:=proc(n) local t1; t1:=floor(sqrt(2*n)); if n = t1*(t1+1)/2 then return t1 ; else return -1; end if; end;
    A034963 := proc(n)
        add(ithprime(i),i=n..n+3) ;
    end proc:
    for n from 1 to 90000 do
        ist := istriangular(A034963(n)) ;
        if ist >= 0 then
            printf("%d,",ist) ;
        end if;
    end do: # R. J. Mathar, Jun 04 2013
  • Mathematica
    (Sqrt[8#+1]-1)/2&/@Select[Total/@Partition[Prime[Range[ 60000]],4,1], OddQ[ Sqrt[8#+1]]&] (* Harvey P. Dale, Apr 06 2016 *)

A252018 Numbers n such that n^2 is a sum of 6 consecutive primes.

Original entry on oeis.org

60, 156, 160, 218, 258, 314, 360, 372, 478, 486, 576, 616, 636, 700, 748, 832, 1070, 1108, 1152, 1250, 1564, 1614, 1636, 1644, 1686, 1710, 1738, 1846, 1862, 1878, 1924, 2010, 2060, 2062, 2156, 2182, 2376, 2490, 2530, 2748, 2754, 2774, 2824, 2826, 2834, 2860, 2896, 2902
Offset: 1

Views

Author

Zak Seidov, Dec 14 2014

Keywords

Examples

			60^2 = 3600 = prime(107) + ... + prime(112) = 587 + 593 + 599 + 601 + 607 + 613,
156^2 = 24336 = prime(557) + ... + prime(562) = 4027 + 4049 + 4051 + 4057 + 4073 + 4079.
		

Crossrefs

Programs

  • Mathematica
    Select[Sqrt[#]&/@(Total/@Partition[Prime[Range[150000]],6,1]),IntegerQ] (* Harvey P. Dale, Aug 02 2021 *)

A252066 Numbers n such that n^2 is a sum of 2 and also of 4 consecutive primes.

Original entry on oeis.org

6, 24, 42, 48, 1326, 1676, 2772, 4428, 4820, 4940, 5328, 5472, 6318, 9950, 10074, 12942, 13724, 14372, 16290, 18428, 22776, 22818, 23800, 23952, 25134, 28614, 28800, 31212, 31394, 32060, 33716, 36526, 37320, 39228, 39446, 39528, 43670, 43798, 44490, 45570, 47700, 48000
Offset: 1

Views

Author

Zak Seidov, Dec 13 2014

Keywords

Examples

			6^2=36=17+19=5+7+11+13, 18^2=324=157+163=73+79+83+89.
		

Crossrefs

Intersection of A051395 and A074924.

Programs

  • Mathematica
    Module[{nn=10^7,p2,p4},p2=Total/@Partition[Prime[Range[nn]],2,1];p4=Total/@Partition[ Prime[Range[nn]],4,1];Select[Sqrt[Intersection[p2,p4]],IntegerQ]] (* The program generates the first 20 terms of the sequence. *) (* Harvey P. Dale, May 03 2024 *)

A252019 Numbers n such that n^2 is a sum of 2, 4 and 6 consecutive primes.

Original entry on oeis.org

4820, 69636, 97058, 405888, 454086, 585828, 656490, 711282, 717486, 1161132, 1348582, 1560352, 1564810, 1625370, 1811262, 1838510, 1926224, 2446248, 2601094, 2670318, 2699918, 2961770, 2966112, 3234498, 3372694, 3387258, 3705880, 3860232, 3980524, 4104264, 4147330
Offset: 1

Views

Author

Zak Seidov, Dec 14 2014

Keywords

Comments

All terms are even. - Michel Marcus, Jul 07 2015

Crossrefs

Intersection of A051395, A074924 and A252018.
Also, intersection of A252066 and A252018.

A251056 Numbers n such that n^2 is a sum of 8 consecutive primes.

Original entry on oeis.org

38, 414, 466, 514, 714, 844, 850, 1076, 1136, 1186, 1370, 1512, 1544, 1580, 1600, 1700, 1844, 1900, 1918, 2028, 2114, 2250, 2304, 2320, 2330, 2364, 2396, 2404, 2450, 2674, 2846, 2894, 3076, 3314, 3346, 3506, 3612, 3622, 3676, 3718, 3774, 3866, 3912, 3966, 4012, 4126, 4506, 4700
Offset: 1

Views

Author

Zak Seidov, Dec 14 2014

Keywords

Examples

			38^2 = 1444 = prime(38) + ... + prime(45) = 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197,
414^2 = 171396 = prime(2401) + ... + prime(2408) = 21391 + 21397 + 21401 + 21407 + 21419 + 21433 + 21467 + 21481.
		

Crossrefs

Programs

  • Mathematica
    Sqrt[#]&/@Select[Total/@Partition[Prime[Range[250000]],8,1], IntegerQ[ Sqrt[#]]&] (* Harvey P. Dale, Nov 28 2018 *)

A363281 Numbers which are the sum of 4 squares of distinct primes.

Original entry on oeis.org

87, 159, 183, 199, 204, 207, 231, 247, 252, 303, 319, 324, 327, 343, 348, 351, 364, 367, 372, 399, 423, 439, 444, 463, 468, 471, 484, 487, 492, 495, 511, 516, 532, 535, 540, 543, 556, 559, 564, 567, 583, 588, 591, 604, 607, 612, 628, 655, 660, 663, 676, 679, 684, 700, 703, 708
Offset: 1

Views

Author

Zhining Yang, May 25 2023

Keywords

Examples

			87 is a term as 87 = 2^2 + 3^2 + 5^2 + 7^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@1000,
     Length[PowersRepresentations[#, 4, 2] // Select[AllTrue@PrimeQ] //
         Select[DuplicateFreeQ]] > 0 &]
  • PARI
    upto(n) = {if(n <= 86, return([])); my(pr = primes(primepi(sqrtint(n - 38))), res = List()); forvec(v = vector(4, i, [1, #pr]), c = sum(i = 1, #v, pr[v[i]]^2); if(c <= n, listput(res, c)), 2); listsort(res, 1); res} \\ David A. Corneth, Jul 12 2023
  • Python
    from itertools import combinations as comb
    ps=[p**2 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]]
    a=[n for n in range(1001) if n in [sum(n) for n in list(comb(ps,4))]]
    print(a)
    

A217443 Primes p such that p^2 is an arithmetic average of 4 consecutive primes.

Original entry on oeis.org

3, 179, 443, 487, 523, 1237, 1481, 1571, 1933, 2293, 2801, 3307, 3863, 4073, 4493, 4787, 4909, 5399, 5683, 5693, 6427, 7433, 7789, 9067, 9623, 10607, 10883, 11437, 11497, 11579, 12149, 12263, 12553, 13337, 13669, 13841, 14071, 14723, 14741, 15569, 15901, 16381
Offset: 1

Views

Author

Zak Seidov, Oct 03 2012

Keywords

Comments

2*p is a term of A051395: 2*3 = A051395(1), 2*179 = A051395(10), 2*443 = A051395(22).

Examples

			3^2 = (5+7+11+13)/4, 179^2 = (32027+32029+32051+32057)/4.
		

Crossrefs

Cf. A051395.

Programs

  • Mathematica
    Select[Sqrt[Mean[#]]&/@Partition[Prime[Range[147*10^5]],4,1],PrimeQ] (* Harvey P. Dale, Jul 27 2019 *)

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.
Showing 1-10 of 11 results. Next