OFFSET
1,1
COMMENTS
Values of a^2 + b^2 + c^2 such that (a^2 + b^2 + c^2)^2 + a^2 + b^2 + c^2 is not of the form x^2 + y^2 + z^2 where a, b, c, x, y, z are nonzero integers.
First differences of this sequence are 7, 25, 7, 25, 7, 25, 7, 25, 7, 25, ...
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
From Colin Barker, Apr 30 2016: (Start)
a(n) = (32*n-17-9*(-1)^n)/2.
a(n) = 16*n-13 for n even.
a(n) = 16*n-4 for n odd.
a(n) = a(n-1)+a(n-2)-a(n-3) for n>3.
G.f.: x*(12+7*x+13*x^2) / ((1-x)^2*(1+x)).
(End)
EXAMPLE
MATHEMATICA
Select[Range[10^3], Length[PowersRepresentations[#, 3, 2] /. {0, __} -> Nothing] > 0 && Length[PowersRepresentations[# (# + 1), 3, 2] /. {0, __} -> Nothing] == 0 &] (* Michael De Vlieger, Apr 20 2016, Version 10.2 *)
LinearRecurrence[{1, 1, -1}, {12, 19, 44}, 60] (* Harvey P. Dale, Mar 13 2017 *)
PROG
(PARI) isA000408(n) = my(a, b) ; a=1 ; while(a^2+1<n, b=1 ; while(b<=a && a^2+b^2<n, if(issquare(n-a^2-b^2), return(1) ) ; b++ ; ) ; a++ ; ) ; return(0);
lista(nn) = for(n=1, nn, if(isA000408(n) && !isA000408(n*(n+1)), print1(n, ", ")));
(PARI) Vec(x*(12+7*x+13*x^2)/((1-x)^2*(1+x)) + O(x^50)) \\ Colin Barker, Apr 30 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Apr 20 2016
STATUS
approved