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.

A064770 Replace each digit of n with the floor of its square root.

This page as a plain text file.
%I A064770 #37 Dec 23 2024 14:53:42
%S A064770 0,1,1,1,2,2,2,2,2,3,10,11,11,11,12,12,12,12,12,13,10,11,11,11,12,12,
%T A064770 12,12,12,13,10,11,11,11,12,12,12,12,12,13,20,21,21,21,22,22,22,22,22,
%U A064770 23,20,21,21,21,22,22,22,22,22,23,20,21,21,21,22,22,22,22,22,23
%N A064770 Replace each digit of n with the floor of its square root.
%C A064770 The graph of this sequence is fractal-like.
%C A064770 a(A007088(n))=A007088(n); a(A136399(n))<>A136399(n); a(a(n))=A136400(n); a(A136400(n))=A136400(n); A136428(n)=a(n+1)-a(n). - _Reinhard Zumkeller_, Dec 30 2007
%H A064770 Reinhard Zumkeller, <a href="/A064770/b064770.txt">Table of n, a(n) for n = 0..9999</a>
%H A064770 Olivier Gerard, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/seqfandata/A064770-spadaro.png">Fractal behavior of this sequence (1)</a>. [broken link]
%e A064770 26 -> [1.414...][2.449...] -> 12, so a(26) = 12.
%p A064770 a:= n-> (l-> add(([0, 1$3, 2$5, 3][l[i]+1])*10^i,
%p A064770          i=1..nops(l))/10)(convert(n, base, 10)):
%p A064770 seq(a(n), n=0..69);  # _Alois P. Heinz_, Oct 19 2024
%t A064770 Table[ FromDigits[ Floor[ Sqrt[ IntegerDigits[ n]]]], {n, 0, 100} ]
%t A064770 With[{dg=Table[n->Floor[Sqrt[n]],{n,0,9}]},Table[FromDigits[ IntegerDigits[ k]/.dg],{k,0,100}]] (* _Harvey P. Dale_, Oct 23 2020 *)
%o A064770 (Haskell)
%o A064770 import Data.Char (digitToInt)
%o A064770 a064770 :: Integer -> Integer
%o A064770 a064770 = read . map (("0111222223" !!) . digitToInt) . show
%o A064770 -- _Reinhard Zumkeller_, Aug 24 2011
%o A064770 (PARI) a(n) = fromdigits(apply(sqrtint, digits(n))); \\ _Michel Marcus_, Nov 12 2023
%o A064770 (Python)
%o A064770 def A064770(n): return int(''.join(map(lambda x:'0111222223'[int(x)], str(n)))) # _Chai Wah Wu_, Oct 19 2024
%Y A064770 Cf. A007088, A136399, A136400, A136428.
%K A064770 base,nonn,nice,look
%O A064770 0,5
%A A064770 _Santi Spadaro_, Oct 19 2001