OFFSET
1,2
COMMENTS
Numbers ending in 1, 2, 8 or 9.
LINKS
Wikipedia, Refactorable number.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
a(n) = 10*floor((n-1)/4)+(10+(-1)^n+7*cos(n*Pi/2)-7*sin(n*Pi/2))/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt((1+1/sqrt(5))/2)*Pi/5. - Amiram Eldar, Apr 15 2023
G.f.: x*( 1+x+6*x^2+x^3+x^4 ) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Mar 25 2024
a(n) = a(n-1) + a(n-4) - a(n-5). - Wesley Ivan Hurt, Apr 24 2024
EXAMPLE
158 is in the sequence since 8 is a refactorable number.
MATHEMATICA
Table[10*Floor[(n - 1)/4] + (10 + (-1)^n + 7*Cos[n*Pi/2] - 7*Sin[n*Pi/2]) / 2, {n, 100}]
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Wesley Ivan Hurt, Jun 05 2021
STATUS
approved