cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A308171 Limiting sequence of digits, read from the right, when starting with 5 we repeatedly replace each digit with its square (as in A308170).

Original entry on oeis.org

5, 2, 4, 6, 1, 6, 3, 1, 6, 3, 9, 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, 1, 6, 3, 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, 8, 1, 4, 6, 1, 6, 1, 6, 3, 1, 6, 3, 1, 6, 3, 9, 1, 6, 3, 9, 1
Offset: 1

Views

Author

N. J. A. Sloane, May 15 2019, following a suggestion from Jeremy Gardiner

Keywords

Comments

As Jean-Paul Allouche remarks on the SeqFan list, also the limiting sequence of the morphism 5 -> 52, 2 -> 4, 4 -> 61, 6 -> 63, 1 -> 1, 3 -> 9, 9 -> 18, 8 -> 46 over the alphabet {1..9} \ {7}, iterated on an initial value of 5. The digit 7 never occurs, and digits 2 and 5 only occur as a(1) and a(2). - M. F. Hasler, May 15 2019 [Corrected by N. J. A. Sloane, May 16 2019]

Examples

			Replacing each digit with its square, we get 5 -> 25 -> 425 -> 16425 -> 13616425 -> .... The final digits converge to ...16425, or read from the right, to this sequence: 5, 2, 4, 6, 1, ... - _M. F. Hasler_, May 15 2019
		

Crossrefs

Programs

  • Mathematica
    s = {5}; Do[s = Flatten[ Reverse@ IntegerDigits[#^2] & /@ s]; If[Length[s] > 100, s = Take[s, 100]], {100}]; s (* Giovanni Resta, Jul 03 2019 *)
  • PARI
    { wanted = 87; a = [5]; 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
    A308171_vec(N, a=[5])={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

A082027 a(1)=6; a(n) is concatenation of the squares of each digit of a(n-1), in order (in base 10).

Original entry on oeis.org

6, 36, 936, 81936, 64181936, 3616164181936, 93613613616164181936, 819361936193613613616164181936, 641819361819361819361936193613613616164181936
Offset: 1

Views

Author

Matthew Vandermast, Apr 01 2003

Keywords

Comments

If m is a member of the sequence consisting of k base-10 digits, every member of the sequence greater than m is congruent to m modulo 10^k.

Examples

			a(4)=81936 because the squares of the digits of a(3)--namely, 9, 3 and 6--are 81, 9 and 36 respectively.
		

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[Flatten[IntegerDigits/@(IntegerDigits[#]^2)]]&,6,10] (* Harvey P. Dale, Feb 28 2013 *)
Showing 1-2 of 2 results.