OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
a(n) = a(n-1)+a(n-3)-a(n-4).
G.f.: x*(8*x^3+2*x^2+7*x+1) / ((x-1)^2*(x^2+x+1)).
EXAMPLE
26 is in the sequence because the digital root of 26 is 8, and 26^3/8 = 2197 = 13^2.
MATHEMATICA
LinearRecurrence[{1, 0, 1, -1}, {1, 8, 10, 19}, 60] (* Harvey P. Dale, Sep 15 2019 *)
PROG
(PARI) s=[]; for(n=1, 400, d=(n-1)%9+1; if(n^3%d==0 && ispower(n^3\d, 3), s=concat(s, n))); s
(PARI) Vec(x*(8*x^3+2*x^2+7*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100))
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Colin Barker, Jan 29 2014
STATUS
approved