OFFSET
1,1
COMMENTS
Period 9: repeat [2, 8, 9, 5, 5, 9, 8, 2, 9].
This sequence is also right if digital root of factor in "2*n^2" is 2 (for example, "11*n^2", "20*n^2", "29*n^2", etc.)
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,1).
FORMULA
G.f.: x*(2 + 8*x + 9*x^2 + 5*x^3 + 5*x^4 + 9*x^5 + 8*x^6 + 2*x^7 + 9*x^8)/(1 - x^9). - Stefano Spezia, Jul 03 2026
EXAMPLE
For n=5, 2*5^2 = 50 and digital root is 5, so a(5) = 5.
MATHEMATICA
Mod[2*Range[100]^2 - 1, 9] + 1 (* Paolo Xausa, Jul 03 2026 *)
PROG
(PARI) dr(n) = if(n, (n-1)%9+1); \\ A010888
a(n) = dr(2*n^2); \\ Michel Marcus, Jan 21 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Radaev Nikita, Jan 10 2021
STATUS
approved
