login
A340536
Digital root of 2*n^2.
0
2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9
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.)
FORMULA
a(n) = A010888(A001105(n)).
EXAMPLE
For n=5, 2*5^2 = 50 and digital root is 5, so a(5) = 5.
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