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-3 of 3 results.

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

Original entry on oeis.org

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, 12, 12, 12, 13, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 20, 21, 21, 21, 22, 22, 22, 22, 22, 23, 20, 21, 21, 21, 22, 22, 22, 22, 22, 23, 20, 21, 21, 21, 22, 22, 22, 22, 22, 23
Offset: 0

Views

Author

Santi Spadaro, Oct 19 2001

Keywords

Comments

The graph of this sequence is fractal-like.
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

Examples

			26 -> [1.414...][2.449...] -> 12, so a(26) = 12.
		

Crossrefs

Programs

  • Haskell
    import Data.Char (digitToInt)
    a064770 :: Integer -> Integer
    a064770 = read . map (("0111222223" !!) . digitToInt) . show
    -- Reinhard Zumkeller, Aug 24 2011
    
  • Maple
    a:= n-> (l-> add(([0, 1$3, 2$5, 3][l[i]+1])*10^i,
             i=1..nops(l))/10)(convert(n, base, 10)):
    seq(a(n), n=0..69);  # Alois P. Heinz, Oct 19 2024
  • Mathematica
    Table[ FromDigits[ Floor[ Sqrt[ IntegerDigits[ n]]]], {n, 0, 100} ]
    With[{dg=Table[n->Floor[Sqrt[n]],{n,0,9}]},Table[FromDigits[ IntegerDigits[ k]/.dg],{k,0,100}]] (* Harvey P. Dale, Oct 23 2020 *)
  • PARI
    a(n) = fromdigits(apply(sqrtint, digits(n))); \\ Michel Marcus, Nov 12 2023
    
  • Python
    def A064770(n): return int(''.join(map(lambda x:'0111222223'[int(x)], str(n)))) # Chai Wah Wu, Oct 19 2024

A321474 Reverse the nonzero digits of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 20, 12, 22, 32, 42, 52, 62, 72, 82, 92, 30, 13, 23, 33, 43, 53, 63, 73, 83, 93, 40, 14, 24, 34, 44, 54, 64, 74, 84, 94, 50, 15, 25, 35, 45, 55, 65, 75, 85, 95, 60, 16, 26, 36, 46, 56, 66, 76
Offset: 0

Views

Author

Rémy Sigrist, Nov 11 2018

Keywords

Comments

This sequence is a self-inverse permutation of nonnegative integers.
See A321464 for the ternary variant.
This sequence has similarities with A069799: here we reverse nonzero digits, there we reverse nonzero prime exponents.

Examples

			For n = 1024:
- 1024 has 3 nonzero digits: 1, 2 and 4,
- so we replace the first nonzero digit by the third, the third by the first (and the second remains in place),
- and we obtain a(1024) = 4021.
		

Crossrefs

Programs

  • PARI
    a(n, base=10) = my (d=digits(n, base), t=Vecrev(select(sign, d)), i=0); for (j=1, #d, if (d[j], d[j] = t[i++])); fromdigits(d, base)

Formula

a(10 * n) = 10 * a(n).
A136400(a(n)) = A136400(n).

A276502 Least k > 0 such that A045876(n) divides A045876(n*10^k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 6
Offset: 1

Views

Author

Altug Alkan, Sep 10 2016

Keywords

Comments

Corresponding values of A045876(n*10^a(n))/A045876(n) are 11, 11, 11, 11, 11, 11, 11, 11, 11, 101, 303, 303, 303, 303, 303, 303, 303, 303, 303, 101, 303, 303, 303, 303, 303, 303, 303, 303, 303, 101, ...
From Charlie Neder, Jul 16 2018: (Start)
From the formula for A045876(n) we make the following modifications:
- A (the mean of the digits) becomes S/D (sum of digits / # of digits)
- N (# of arrangements of digits) becomes R*Z (# of arrangements of nonzero digits * # of ways to insert the proper number of zeros)
Appending zeros to n does not change S or R, so if (S*R*Z*I/D)(n) divides (S*R*Z*I/D)(n*10^k), then (Z*I/D)(n) divides (Z*I/D)(n*10^k). However, Z, I, and D are completely determined by the number of digits of n and the number of those digits which are zero, so a(n) = a(A136400(n)). (End)

Examples

			a(10) = 2 because A045876(10) = 1+10 = 11 does not divide A045876(100) = 1+10+100 = 111 and 11 divides A045876(1000) = 1+10+100+1000 = 1111.
		

Crossrefs

Cf. A045876.

Programs

Showing 1-3 of 3 results.