OFFSET
1,3
COMMENTS
Numbers ending in 0, 1, 4 and 9.
None of these numbers are prime in Z[phi] (where phi = 1/2 + sqrt(5)/2 is the golden ratio), since the numbers in this sequence that are prime in Z can be expressed in the form (a - b sqrt(5))(a + b sqrt(5)). - Alonso del Arte, Dec 30 2015
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
G.f.: x^2*(1 + 3*x + 5*x^2 + x^3)/((x - 1)^2*(1 + x + x^2 + x^3)).
a(n) = a(n - 1) + (n - 4) - a(n - 5) for n > 5.
a(n) = (10n - 11 + (-1)^n + (4 + 2(-1)^n) * (-1)^((2n - 1 + (-1)^n)/4))/4.
a(n+1) - a(n) = A091084(n+1) for n>0.
Sum_{n>=2} (-1)^n/a(n) = (14*sqrt(5)*arccoth(sqrt(5)) - 2*Pi*sqrt(1-2/sqrt(5)) + 16*log(2) + 5*log(5))/40. - Amiram Eldar, Jul 30 2024
MAPLE
MATHEMATICA
Table[(10 n - 11 + (-1)^n + (4 + 2 (-1)^n)*(-1)^((2 n - 1 + (-1)^n)/4))/4, {n, 50}] (* G. C. Greubel, Dec 27 2015 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 4, 9, 10}, 60] (* Vincenzo Librandi, Dec 27 2015 *)
CoefficientList[Series[x*(1 + 3*x + 5*x^2 + x^3)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Dec 30 2015 *)
Flatten[Table[10n + {0, 1, 4, 9}, {n, 0, 19}]] (* Alonso del Arte, Dec 30 2015 *)
Select[Range[0, 150], MemberQ[{0, 1, 4, 9}, Mod[#, 10]]&] (* Harvey P. Dale, Jul 30 2019 *)
PROG
(Magma) [(10*n-11+(-1)^n+(4+2*(-1)^n)*(-1)^((2*n-1+(-1)^n) div 4))/4: n in [1..60]]; // Vincenzo Librandi, Dec 27 2015
(PARI) is(n) = issquare(n%10); \\ Altug Alkan, Dec 29 2015
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Wesley Ivan Hurt, Dec 26 2015
STATUS
approved