A046193 Indices of heptagonal numbers (A000566) which are also triangular numbers (A000217).
1, 5, 221, 1513, 71065, 487085, 22882613, 156839761, 7368130225, 50501915861, 2372515049741, 16261460067385, 763942477886281, 5236139639782013, 245987105364332645, 1686020702549740705, 79207083984837225313, 542893430081376724901, 25504435056012222218045
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..798
- Eric Weisstein's World of Mathematics, Heptagonal Triangular Number.
- Index entries for linear recurrences with constant coefficients, signature (1,322,-322,-1,1).
Programs
-
Magma
[n: n in [1..2*10^8] |IsSquare(2*n-1) and IsSquare(10*n-1)]; // Vincenzo Librandi, Dec 04 2016
-
Mathematica
LinearRecurrence[{1,322,-322,-1,1},{1,5,221,1513,71065},17] (* Ant King, Oct 19 2011 *) Select[Range@240000000, IntegerQ@Sqrt[2 # - 1] && IntegerQ@Sqrt[10 # - 1] &] (* Vincenzo Librandi, Dec 04 2016 *)
-
PARI
Vec(-x*(x^4+4*x^3-106*x^2+4*x+1)/((x-1)*(x^2-18*x+1)*(x^2+18*x+1)) + O(x^50)) \\ Colin Barker, Jun 23 2015
Formula
For n odd, a(n+2) = 322*a(n+1) - a(n) - 96; for n even, a(n+1) = 161*a(n) - 48 + 36*sqrt(20*a(n)^2 - 12*a(n)+1). - Richard Choulet, Sep 29 2007, Oct 09 2007
From Ant King, Oct 19 2011: (Start)
a(n) = 322*a(n-2) - a(n-4) - 96.
a(n) = a(n-1) + 322*a(n-2) - 322*a(n-3) - a(n-4) + a(n-5).
a(n) = (1/20)*((sqrt(5)-(-1)^n)*(sqrt(5)+2)^(2n-1) + (sqrt(5)+(-1)^n)*(sqrt(5)-2)^(2n-1)+6).
a(n) = ceiling((1/20)*(sqrt(5)-(-1)^n)*(2+sqrt(5))^(2n-1)).
G.f.: x*(1 + 4*x - 106*x^2 + 4*x^3 + x^4)/((1-x)*(1-18*x+x^2)*(1+18*x+x^2)).
(End)
Comments