OFFSET
1,2
COMMENTS
The sum of two distinct terms of this sequence is never a square.
Sequence has density 11/32, the maximal density that can be attained with such a sequence.
REFERENCES
J. P. Massias, Sur les suites dont les sommes des termes 2 à 2 ne sont pas des carrés, Publications du département de mathématiques de Limoges, 1982.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
J. C. Lagarias, A. M. Odlyzko, J. B. Shearer, On the density of sequences of integers the sum of no two of which is a square. I. Arithmetic progressions, Journal of Combinatorial Theory. Series A, 33 (1982), pp. 167-185.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,1,-1).
FORMULA
From Colin Barker, May 20 2018: (Start)
G.f.: x*(1 + 4*x + 4*x^2 + 4*x^3 + x^4 + 3*x^5 + 4*x^6 + 4*x^7 + x^8 + 3*x^9 + x^10 + 2*x^11) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10)).
a(n) = a(n-1) + a(n-11) - a(n-12) for n>12.
(End)
PROG
(PARI) isok(n) = ((n%4)==1) || ((n%32)==14) || ((n%32)==26) || ((n%32)==30);
(PARI) Vec(x*(1 + 4*x + 4*x^2 + 4*x^3 + x^4 + 3*x^5 + 4*x^6 + 4*x^7 + x^8 + 3*x^9 + x^10 + 2*x^11) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10)) + O(x^40)) \\ Colin Barker, May 20 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Marcus, May 20 2018
STATUS
approved