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

A226103 Numbers k such that triangular(k)+1 is a prime power (A025475).

Original entry on oeis.org

0, 2, 5, 15, 32, 90, 527, 17919, 1274592, 27538630330959
Offset: 1

Views

Author

Alex Ratushnyak, May 26 2013

Keywords

Comments

Generated prime powers are in A226102.
75055187665070250755513356704300447 is also a term. - Giovanni Resta, May 26 2013

Crossrefs

Programs

  • C
    #include 
    #include 
    #include 
    #define TOP (1ULL<<32)  // Memory usage: 0.5 Gb
    int main() {
      unsigned long long i, j, p, t, r;
      unsigned char *c = (unsigned char *)malloc(TOP/8);
      memset(c, 0, TOP/8);
      for (printf("0, "), i=1; i < TOP; i+=2)
        if ((c[i>>4] & (1<<((i>>1)&7))) == 0) {
          for (p = i + (i==1), j = p*p; ; j*=p) {
            t = j - 1;
            r = sqrt(t*2);
            if (r*(r+1)==t*2)  printf("%llu, ", r);
            double k = ((double)j) * ((double)p);
            if (k >= ((double)(1ULL<<62)*4.0)) break;
          }
          if (i>1) for (j=i*i>>1; j>3] |= 1 << (j&7);
        }
      // SORT the output
      return 0;
    }

Formula

A000217(a(n)) + 1 = a(n) * (a(n)+1) / 2 + 1 = A226102(n).

Extensions

a(10) from Giovanni Resta, May 26 2013
Showing 1-1 of 1 results.