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.

A136116 Indices of pentagonal numbers (A000326) which are the sum of 2 other positive pentagonal numbers.

This page as a plain text file.
%I A136116 #7 Jan 25 2021 14:41:26
%S A136116 7,8,24,25,29,31,36,42,49,59,65,66,69,72,73,74,76,80,83,93,94,99,102,
%T A136116 104,110,117,118,121,122,123,124,126,127,138,140,144,149,150,152,161,
%U A136116 163,168,169,174,175,178,181,185,188,190,195,199,203,209,210,212,213
%N A136116 Indices of pentagonal numbers (A000326) which are the sum of 2 other positive pentagonal numbers.
%F A136116 A000326(a(n))=A000326(m)+A136114(m) where m is the index of the n-th nonzero term in A136114 or A136115.
%e A136116 a(1)=7 since P(7)=70 is the least pentagonal number which can be written as sum of two other pentagonal numbers, P(7)=P(5)+P(5).
%o A136116 (PARI) P(n)=n*(3*n-1)>>1 /* a.k.a. A000326 */
%o A136116 isPent(t)=P(sqrtint(t<<1\3)+1)==t
%o A136116 for(i=1,999,for(j=1,(i+1)\sqrt(2),isPent(P(i)-P(j))&print1(i",") || next(2)))
%o A136116 /* The following are much faster, at the cost of implementing sum2sqr(), cf. A133388. */
%o A136116 A136116next(i)=i=6*i-1;until(0,for(j=2,#t=sum2sqr((i+=6)^2+1),t[j]%6==[5,5] && break(2))); i\6+1
%o A136116 A136116vect(n,i=0)=vector(n,j,i=A136116next(i))
%o A136116 A136116(n,i=0)=until(!n--,i=A136116next(i));i \\ _M. F. Hasler_, Dec 25 2007
%Y A136116 Cf. A000326, A136112-A136118.
%K A136116 nonn
%O A136116 1,1
%A A136116 _M. F. Hasler_, Dec 15 2007; corrected Dec 25 2007