A219113 Sequence of integers which are simultaneously a sum of consecutive squares and a difference of consecutive cubes.
1, 61, 5941, 582121, 57041881, 5589522181, 547716131821, 53670591396241, 5259170240699761, 515345012997180301, 50498552103482969701, 4948342761128333850361, 484887092038473234365641, 47513986677009248633982421, 4655885807254867892895911581
Offset: 1
Examples
1 = 0^2+1^2 = 1^3-0^3. 61 = 5^2+6^2 = 5^3-4^3.
Links
- Puzzle 662
- Index entries for linear recurrences with constant coefficients, signature (99,-99,1).
Crossrefs
Cf. A105038.
Programs
-
PARI
A(n)=my(v=[0,4],k,a);a=if(n<3,v[n],for(k=3,n,v=concat(v,v[#v]*10-v[#v-1]+4));v[#v]);3*a*(a+1)+1
Formula
G.f.: -x*(x^2-38*x+1) / ((x-1)*(x^2-98*x+1)). [Colin Barker, Nov 21 2012]
a(n) = (6+(5-2*sqrt(6))^(2*n-1)+(5+2*sqrt(6))^(2*n-1))/16. - Gerry Martens, Jun 06 2015
a(n) = 98*a(n-1)-a(n-2)-36, n>=3. - R. J. Mathar, Nov 07 2015