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.

Previous Showing 51-60 of 72 results. Next

A121105 Trajectory of 679 under "x -> product of digits of x" map.

Original entry on oeis.org

679, 378, 168, 48, 32, 6
Offset: 1

Views

Author

N. J. A. Sloane, Aug 12 2006

Keywords

Comments

This is the smallest number of persistence 5 (cf. A003001).

Crossrefs

Cf. A003001.

Programs

  • Mathematica
    Most[FixedPointList[Times@@IntegerDigits[#]&,679,7]] (* Harvey P. Dale, Sep 13 2024 *)

Extensions

Edited by Charles R Greathouse IV, Aug 05 2010

A121110 Trajectory of 3778888999 under "x -> product of digits of x" map.

Original entry on oeis.org

3778888999, 438939648, 4478976, 338688, 27648, 2688, 768, 336, 54, 20, 0
Offset: 1

Views

Author

N. J. A. Sloane, Aug 12 2006

Keywords

Comments

This is the smallest number of persistence 10 (cf. A003001).

Crossrefs

Cf. A003001.

Programs

  • Mathematica
    Most[FixedPointList[Times@@IntegerDigits[#]&,3778888999]] (* Harvey P. Dale, Jun 08 2017 *)

Extensions

Edited by Charles R Greathouse IV, Aug 05 2010

A121111 Trajectory of 277777788888899 under "x -> product of digits of x" map.

Original entry on oeis.org

277777788888899, 4996238671872, 438939648, 4478976, 338688, 27648, 2688, 768, 336, 54, 20, 0
Offset: 1

Views

Author

N. J. A. Sloane, Aug 12 2006

Keywords

Comments

This is the smallest number of persistence 11 (cf. A003001). It is conjectured that no number has persistence greater than 11.

Crossrefs

Cf. A003001.

Programs

  • Mathematica
    NestWhileList[Times@@IntegerDigits[#]&,277777788888899,#>0&] (* Harvey P. Dale, Nov 25 2022 *)

Formula

a(n)=A121110(n-1), n>=3. [From R. J. Mathar, Aug 07 2008]

Extensions

Edited by Charles R Greathouse IV, Aug 05 2010

A131809 Multiplicative persistence of Catalan numbers.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 3, 1, 5, 4, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

After the 57th terms all the numbers have some digits equal to zero thus the persistence is equal to 1.

Examples

			Catalan number 429 -> 4*2*9=72 -> 7*2=14 -> 1*4=4 thus persistence is 3
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,w,ok,cont; for i from 0 by 1 to n do k:=(2*i)!/(i!*(i+1)!); w:=1; ok:=1; if k<10 then print(0); else cont:=1; while ok=1 do while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w<10 then ok:=0; print(cont); else cont:=cont+1; k:=w; w:=1; fi; od; fi; od; end: P(100);

A131810 Additive persistence of Catalan numbers.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 2, 4, 3, 2, 3
Offset: 0

Views

Author

Keywords

Examples

			Catalan number 429 -> 4+2+9=15 -> 1+5=6 thus persistence is 2
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat): P:=proc(n) local a,t; t:=0; a:=(2*n)!/(n!*(n+1)!); while a>9 do t:=t+1; a:=convert(convert(a,base,10),`+`); od; t;
    end: seq(P(i),i=0..10^2);

Extensions

Corrected entries and Maple code by Paolo P. Lava, Dec 19 2017

A176762 Smallest number that takes n steps to reach a cycle under iteration of sum-of-squares-of-digits map.

Original entry on oeis.org

1, 10, 13, 23, 19, 7, 356, 4, 2, 11, 15, 5, 3, 14, 45, 36, 6, 112, 269, 15999
Offset: 0

Views

Author

Robert G. Wilson v, Apr 25 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ (IntegerDigits[n]^2); t = Table[0, {25}]; k = 1; While[k < 150000001, a = Length@ NestWhileList[f, k, UnsameQ@## &, All] - 1; If[a < 25 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]

Formula

a(n) = minimum of either A001273(n) or A094406(n+3).

A201991 Smallest palindrome which has multiplicative persistence n.

Original entry on oeis.org

0, 11, 44, 55, 77, 868, 69996, 2683862, 6783876, 268969862, 37889398873, 477788989887774
Offset: 0

Views

Author

Arkadiusz Wesolowski, Dec 07 2011

Keywords

Comments

Probably finite.

Examples

			0 has persistence 0.
11 -> 1 has persistence 1.
44 -> 16 -> 6 has persistence 2.
55 -> 25 -> 10 -> 0 has persistence 3.
77 -> 49 -> 36 -> 18 -> 8 has persistence 4.
868 -> 384 -> 96 -> 54 -> 20 -> 0 has persistence 5.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; int[n_] := IntegerDigits[n]; n = 0; Do[While[True, s = Length@int[n]; r = PadRight[int[n], 2*s, Reverse@int[n]]; If[s > 1, r = Drop[r, {s}]]; p = k = FromDigits[r]; c = 0; While[k > 9, k = Times @@ int[k]; c++]; If[c == l, Break[]]; n++]; AppendTo[lst, p], {l, 0, 10}]; lst (* Arkadiusz Wesolowski, Jul 05 2012 *)

A336383 a(n) is the smallest number such that, with f(x) = x - (the product of the digits of x), f(a(n)) reaches a fixed point after n iterations.

Original entry on oeis.org

0, 1, 21, 31, 42, 52, 73, 81, 319, 391, 463, 583, 2911, 3667, 6451, 8793, 9927, 237126, 254158, 278393, 2561363, 9398143, 9431623, 9951265, 83543869, 83896381, 83935261, 2843233127, 2847297383, 2853748583, 2885762663, 266998137657, 685718563667, 688373877587
Offset: 0

Views

Author

Alon Ran, Jul 19 2020

Keywords

Comments

A fixed point occurs once the function returns a number that contains the digit 0. After that, the product of the digits will be 0, and so subtracting it from the number will be idempotent.
This sequence is conceptually similar to A003001, though unlike the latter, it is probably infinite.

Examples

			a(9) = 391 because:
   1: 391 - 3*9*1 = 364
   2: 364 - 3*6*4 = 292
   3: 292 - 2*9*2 = 256
   4: 256 - 2*5*6 = 196
   5: 196 - 1*9*6 = 142
   6: 142 - 1*4*2 = 134
   7: 134 - 1*3*4 = 122
   8: 122 - 1*2*2 = 118
   9: 118 - 1*1*8 = 110
After iteration 9, the function becomes idempotent:
  10: 110 - 1*1*0 = 110
  11: 110 - 1*1*0 = 110
  12: 110 - 1*1*0 = 110
  ...
Additionally, 391 is the smallest number with this property. Thus, it is a(9).
		

Crossrefs

Programs

  • Mathematica
    nmax = 20; tab = ConstantArray[Null, nmax];
    For[k = 0, k <= 1000000, k++,
     l=Length@  NestWhileList[#-Times @@ IntegerDigits[#] &,k,UnsameQ[##] &, 2]-2;
    If[tab[[l+1]] == Null, tab[[l+1]] = k]]; tab  (* Robert Price, Sep 13 2020 *)
  • PARI
    f(m) = m - vecprod(digits(m)) + (m==0);
    lista(nn) = {my(c, m, t); for(k=0, nn, c=0; m=k; while(m!=(m=f(m)), c++); if(c==t, print1(k, ", "); t++)); } \\ Jinyuan Wang, Aug 14 2020
  • Python
    def f(x):
        prod = 1
        for digit in str(x):
            prod *= int(digit)
        return x - prod
    def a(n):
        i = 0
        iteration = 0
        while iteration != n:
            i += 1
            j = i
            iteration = 0
            new_j = f(j)
            while j != new_j:
                iteration += 1
                j = new_j
                new_j = f(j)
        return i
    

Extensions

a(27)-a(30) from Jinyuan Wang, Aug 14 2020
a(31)-a(33) added by Michael S. Branicky, Aug 29 2020

A336682 a(n) is the number of iterations needed to reach a fixed point starting with n and repeatedly applying f(x) = x - (the product of the digits of x).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 3, 3, 3, 3, 1, 2, 2, 2, 2, 0, 3, 4, 4, 3, 3, 3, 2, 2, 2, 0, 4, 5, 3, 4, 1, 3, 3, 2, 2, 0, 2, 1, 4, 1, 2, 1, 3, 1, 2, 0, 2, 3, 6, 4, 1, 4, 3, 3, 2, 0, 7, 2, 3, 6, 4
Offset: 0

Views

Author

Robert Price, Sep 13 2020

Keywords

Examples

			a(42) = 4 because:
1: 42 - 4*2 = 34
2: 34 - 3*4 = 22
3: 22 - 2*2 = 18
4: 18 - 1*8 = 10
5: 10 - 1*0 = 10
		

Crossrefs

Programs

  • Mathematica
    Table[Length@  NestWhileList[# - Times @@ IntegerDigits[#] &, n, UnsameQ[##] &,
    2] - 2, {n, 0, 85}];(* Robert Price, Sep 13 2020 *)

A067670 Smallest prime of additive persistence n.

Original entry on oeis.org

2, 11, 19, 199, 29998999999999999999999
Offset: 0

Views

Author

Shyam Sunder Gupta, Feb 23 2002

Keywords

Comments

a(5) >= 29*10^2222222222222222222221-1, the next number of additive persistence 5 after A006050(5). (a(5) is not equal to A006050(5) because that number is divisible by 313.) - Pontus von Brömssen, Oct 17 2023

Examples

			a(2) = 19, 19 -> 10 -> 1, so 2 summation steps are required to reach a single-digit number.
		

References

  • H. J. Hindin, The additive persistence of a number, J. Rec. Math., 7 (No. 2, 1974), 134-135.

Crossrefs

Formula

a(n) >= A006050(n). - Pontus von Brömssen, Oct 17 2023
Previous Showing 51-60 of 72 results. Next