A308170 Start with the number 7, repeatedly square every digit in place to get a new number; in the limit this process converges (reading from right to left) to the string shown here.
1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 1, 6, 3, 1, 6, 3, 1, 6, 3, 9, 1, 6, 3, 9, 1, 6, 3, 9, 1, 8, 1, 6, 3, 9, 1, 8, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 1, 6, 3, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 1, 6, 3, 1, 6, 3, 9
Offset: 1
Examples
The successive numbers that arise are 7 49 1681 136641 193636161 1819369361361 1641819368193619361 ... and reading from the right we see 1,6,3,9, ...
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..25000
Programs
-
PARI
{ wanted = 87; a = [7]; while (1, b = concat(apply(d -> if (d,digits(d^2),[0]),a)); if (#b > wanted, b = b[#b-wanted+1..#b]); if (a==b, break, a = b)); print (Vecrev(a)) } \\ Rémy Sigrist, May 15 2019
-
PARI
A308170_vec(N,a=[9])={while(a!=a=concat(apply(t->digits(t^2),if(#a>N,a[-N..-1],a))),); Vecrev(a[-N..-1])} \\ M. F. Hasler, May 15 2019
Extensions
More terms from Rémy Sigrist, May 15 2019
Comments