

A055793


Numbers n such that n and floor[n/3] are both squares; i.e., squares which remain squares when written in base 3 and last digit is removed.


28



0, 1, 4, 49, 676, 9409, 131044, 1825201, 25421764, 354079489, 4931691076, 68689595569, 956722646884, 13325427460801, 185599261804324, 2585064237799729, 36005300067391876, 501489136705686529, 6984842613812219524, 97286307456665386801
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Or, squares of the form 3n^2+1.


LINKS



FORMULA

a(n) = 14*a(n1)a(n2)6, with a(0)=1, a(1)=4. (See Brown and Shiue)
G.f.: x*(1  11*x + 4*x^2)/((1  x)*(1  14*x + x^2)).  M. F. Hasler, Jan 15 2012


EXAMPLE

a(3) = 49 because 49 = 7^2 = 1211 base 3 and 121 base 3 = 16 = 4^2.


MAPLE



MATHEMATICA

CoefficientList[Series[x*(1  11*x + 4*x^2)/((1  x)*(1  14*x + x^2)), {x, 0, 20}], x] (* Wesley Ivan Hurt, Sep 28 2014 *)
LinearRecurrence[{15, 15, 1}, {0, 1, 4, 49}, 40] (* Harvey P. Dale, Jun 19 2021 *)


PROG

(PARI) sq3nsqplus1(n) = { for(x=1, n, y = 3*x*x+1; \ print1(y" ") if(issquare(y), print1(y" ")) ) }
(Magma) I:=[0, 1, 4]; [n le 3 select I[n] else 14*Self(n1)  Self(n2)  6: n in [1..30]]; // Vincenzo Librandi, Jan 27 2013


CROSSREFS



KEYWORD

base,nonn,easy


AUTHOR



EXTENSIONS



STATUS

approved



