A055808 a(n) and floor(a(n)/4) are both squares; i.e., squares that remain squares when written in base 4 and last digit is removed.
0, 1, 4, 16, 36, 64, 100, 144, 196, 256, 324, 400, 484, 576, 676, 784, 900, 1024, 1156, 1296, 1444, 1600, 1764, 1936, 2116, 2304, 2500, 2704, 2916, 3136, 3364, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 6084, 6400, 6724, 7056, 7396, 7744, 8100
Offset: 0
Examples
36 is in the sequence because 36 = 6^2 = 210 base 3 and 21 base 4 = 9 = 3^2.
Links
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Magma
[Floor((2*n^2)/(1 + n))^2: n in [0..60]]; // Vincenzo Librandi, Aug 03 2015
-
Mathematica
Join[{0, 1}, LinearRecurrence[{3, -3, 1}, {4, 16, 36}, 50]] (* Vincenzo Librandi, Aug 03 2015 *)
-
PARI
concat(0, Vec(x*(x^3-7*x^2-x-1)/(x-1)^3 + O(x^100))) \\ Colin Barker, Sep 15 2014
-
PARI
is_ok(n)=issquare(n) && issquare(floor(n/4)); first(m)=my(v=vector(m),r=0);for(i=1,m,while(!is_ok(r),r++);v[i]=r;r++;);v; /* Anders Hellström, Aug 08 2015 */
Formula
a(n) = A004275(n)^2. - M. F. Hasler, Jan 16 2012
a(n) = 4*(-1+n)^2 for n>1; a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>4; G.f.: x*(x^3-7*x^2-x-1) / (x-1)^3. - Colin Barker, Sep 15 2014
Comments