OFFSET
0,3
COMMENTS
The sequence lists all m, in increasing order, such that floor(m/2) + floor(m/3) is a square.
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,2,-2,0,0,-1,1).
FORMULA
G.f.: x*(1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2).
a(n) = (30*(n-1)*n + 2*(18*n-3*(-1)^n-11)*(-1)^(n*(n+1)/2) - (6*n+1)*(-1)^n + 13)/16 + 1. Therefore:
a(4*k) = 30*k^2;
a(4*k+1) = 30*k^2 + 1;
a(4*k+2) = 30*k^2 + 12*k + 2;
a(4*k+3) = 30*k^2 + 48*k + 20.
MATHEMATICA
CoefficientList[x (1 + x + 18 x^2 + 10 x^3 - x^4 + 11 x^5 + 18 x^6 + 2 x^7)/((1 + x)^2 (1 - x)^3 (1 + x^2)^2) + O[x]^50, x]
PROG
(Sage) gf = x*(1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2); taylor(gf, x, 0, 50).list()
(PARI) concat(0, Vec((1 + x+18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2) + O(x^50)))
(Maxima) makelist(coeff(taylor(x*(1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2), x, 0, n), x, n), n, 0, 50);
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!((1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2)));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Feb 12 2016
STATUS
approved