OFFSET
1,3
COMMENTS
Or: Numbers whose square, with its last base-7 digit dropped, is again a square (where for the first 3 terms, dropping the digit is meant to yield zero).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
M. F. Hasler, Truncated squares, OEIS wiki, Jan 16 2012
Index entries for linear recurrences with constant coefficients, signature (0,0,16,0,0,-1).
FORMULA
G.f. = (x + 2*x^2 + 3*x^3 - 8*x^4 - 16*x^5 - 3*x^6 )/(1 - 16*x^3 + x^6).
floor(a(n)^2 / 7) = A204517(n)^2.
MATHEMATICA
LinearRecurrence[{0, 0, 16, 0, 0, -1}, {0, 1, 2, 3, 8, 16, 45}, 30] (* or *) CoefficientList[Series[ (x+2x^2+3x^3-8x^4-16x^5-3x^6)/(1-16x^3+x^6), {x, 0, 30}], x] (* Harvey P. Dale, Apr 22 2023 *)
PROG
(PARI) b=7; for(n=0, 2e9, issquare(n^2\b) & print1(n", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jan 15 2012
STATUS
approved