A381491 a(n) = A010888(A381487(n)).
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 2, 4, 8, 9, 7, 9, 2, 4, 8, 9, 5, 2, 9, 7, 4, 8, 9, 2, 9, 4, 8, 7, 9, 5, 2, 9, 4, 8, 9, 7, 2, 4, 9, 8, 9, 2, 4, 5, 9, 7, 8, 9, 2, 4, 9, 8, 7, 9, 2, 4, 8, 9, 5, 9, 2, 7, 4, 8, 9, 9, 2, 4, 8, 9, 7, 5, 9, 2, 4, 8, 9, 7, 2, 9, 4, 8, 9
Offset: 1
Examples
a(12) = 2 because the digital root of A381487(12) = 128 is 2.
Links
- Michel Marcus, Table of n, a(n) for n = 1..3347
Programs
-
Mathematica
A010888[n_]:=n - 9*Floor[(n-1)/9]; kmax=5*10^6; a={0,1}; For[k=2, k<=kmax, k++, If[A010888[k]!=1, If[IntegerQ[Log[A010888[k],k]], AppendTo[a,A010888[k]]]]]; a
-
PARI
dr(n) = if(n, (n-1)%9+1); \\ A010888 lista(nn) = my(list = List()); listput(list, 0); listput(list, 1); for (n=2, 9, for (k=1, logint(nn, n), if (dr(n^k) == n, listput(list, n^k)););); apply(x->dr(x), vecsort(Vec(list))); \\ Michel Marcus, Feb 27 2025
Extensions
More terms from Michel Marcus, Feb 27 2025