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

A226146 Numbers n such that n^2 is an average of three successive primes.

Original entry on oeis.org

49, 161, 219, 351, 363, 469, 575, 597, 671, 877, 909, 933, 1013, 1225, 1231, 1303, 1359, 1381, 1419, 1489, 1577, 1653, 1797, 1815, 1989, 2083, 2117, 2177, 2241, 2289, 2301, 2403, 2483, 2493, 2517, 2611, 2617, 2653, 2727, 2779, 2869, 2931, 3029, 3051, 3261, 3515, 3617
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, 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 (p2=2, p1=3, i=5; i < TOP; i+=2)
        if ((c[i>>4] & (1<<((i>>1) & 7)))==0) {
          s = p2 + p1 + i;
          if ((s%3)==0) {
            s/=3;
            r = sqrt(s);
            if (r*r==s) printf("%llu, ", r);
          }
          p2 = p1, p1 = i;
        }
      return 0;
    }
  • Mathematica
    Select[Sqrt[Mean[#]]&/@Partition[Prime[Range[10^6]],3,1],IntegerQ] (* Harvey P. Dale, Oct 23 2021 *)

A226147 Numbers n such that triangular(n) is an average of three successive primes.

Original entry on oeis.org

193, 233, 265, 301, 526, 709, 753, 922, 961, 962, 986, 1126, 1178, 1285, 1373, 1485, 1525, 1537, 1558, 1601, 1710, 1737, 1962, 1965, 2202, 2437, 2466, 2578, 2685, 2693, 2862, 3206, 3346, 3462, 3622, 3682, 3937, 3938, 3965, 4005, 4017, 4018, 4058, 4393, 4489, 4498, 4717
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, 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 (p2=2, p1=3, i=5; i < TOP; i+=2)
        if ((c[i>>4] & (1<<((i>>1) & 7)))==0) {
          s = p2 + p1 + i;
          if ((s%3)==0) {
            s/=3;
            r = sqrt(s*2);
            if (r*(r+1)==s*2) printf("%llu, ", r);
          }
          p2 = p1, p1 = i;
        }
      return 0;
    }

A123984 Primes p such that p^3 is a sum of three successive primes, or primes in A076306(n).

Original entry on oeis.org

11, 47, 223, 229, 313, 353, 397, 409, 571, 641, 661, 887, 1051, 1297, 1451, 1789, 2459, 2671, 2801, 2851, 3671, 4463, 4583, 4813, 4861, 5167, 5273, 5437, 5479, 5717, 5879, 6661, 6679, 6763, 6779, 7019, 7109, 7393, 7517, 7589, 7639, 7681, 7993, 8179, 8191, 9241
Offset: 1

Views

Author

Alexander Adamchuk, Oct 30 2006

Keywords

Comments

A076306(n) = {11, 47, 145, 223, 229, 267, 313, 353, ...} Numbers n such that n^3 is a sum of three successive primes.

Crossrefs

Cf. A076306, A076304. Cf. A122560 - Primes p such that p^2 is a sum of three successive primes. Cf. A122706 - Smallest prime p such that p^n is equal to the sum of 3 consecutive primes.

Programs

  • Mathematica
    spQ[n_]:=Module[{n3=n^3,a,b,c,d,e},c=NextPrime[Floor[n3/3]];b=NextPrime[ c,-1];a=NextPrime[b,-1];d=NextPrime[c];e=NextPrime[d];n3==a+b+c || n3==b+c+d || n3==c+d+e];Select[Prime[Range[1200]],spQ] (* Harvey P. Dale, Sep 23 2011 *)
  • PARI
    { p1=prime(1) ; p2=prime(2) ; p3=prime(3) ; n3=p1+p2+p3 ; for(i=1,100000000, if( ispower(n3,3,&n), if(isprime(n), print(n) ) ; ) ; n3 -= p1 ; p1=p2 ; p2=p3 ; p3=nextprime(p3+1) ; n3 += p3 ; ) ; } \\ R. J. Mathar, Jan 13 2007

Formula

A000040 INTERSECT A076306. - R. J. Mathar, Jan 13 2007

Extensions

More terms from R. J. Mathar, Jan 13 2007
a(15)-a(46) from Donovan Johnson, Apr 27 2008
Previous Showing 11-13 of 13 results.