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.

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

This page as a plain text file.
%I A226103 #18 Aug 29 2025 11:09:18
%S A226103 0,2,5,15,32,90,527,17919,1274592,27538630330959
%N A226103 Numbers k such that triangular(k)+1 is a prime power (A025475).
%C A226103 Generated prime powers are in A226102.
%C A226103 75055187665070250755513356704300447 is also a term. - _Giovanni Resta_, May 26 2013
%F A226103 A000217(a(n)) + 1 = a(n) * (a(n)+1) / 2 + 1 = A226102(n).
%o A226103 (C)
%o A226103 #include <stdio.h>
%o A226103 #include <stdlib.h>
%o A226103 #include <math.h>
%o A226103 #define TOP (1ULL<<32)  // Memory usage: 0.5 Gb
%o A226103 int main() {
%o A226103   unsigned long long i, j, p, t, r;
%o A226103   unsigned char *c = (unsigned char *)malloc(TOP/8);
%o A226103   memset(c, 0, TOP/8);
%o A226103   for (printf("0, "), i=1; i < TOP; i+=2)
%o A226103     if ((c[i>>4] & (1<<((i>>1)&7))) == 0) {
%o A226103       for (p = i + (i==1), j = p*p; ; j*=p) {
%o A226103         t = j - 1;
%o A226103         r = sqrt(t*2);
%o A226103         if (r*(r+1)==t*2)  printf("%llu, ", r);
%o A226103         double k = ((double)j) * ((double)p);
%o A226103         if (k >= ((double)(1ULL<<62)*4.0)) break;
%o A226103       }
%o A226103       if (i>1) for (j=i*i>>1; j<TOP; j+=i)  c[j>>3] |= 1 << (j&7);
%o A226103     }
%o A226103   // SORT the output
%o A226103   return 0;
%o A226103 }
%Y A226103 Cf. A025475, A000217, A226102.
%K A226103 nonn,more,changed
%O A226103 1,2
%A A226103 _Alex Ratushnyak_, May 26 2013
%E A226103 a(10) from _Giovanni Resta_, May 26 2013