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 31-40 of 57 results. Next

A208576 Multiplicative persistence of n in factorial base.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2
Offset: 0

Views

Author

Keywords

Comments

Diamond and Reidpath prove that a(2n) = 1 for n > 0, a(n) = 2 if n is contains an even digit but no 0's in its factorial base representation. If a(n) > 2 then 3 | n.
Further modular properties can be easily proved. For example, a(n) > 2 implies that n is 33, 45, 81, or 93 mod 120.

Crossrefs

Programs

  • PARI
    pr(n)=my(k=1,s=1);while(n,s*=n%k++;n\=k);s
    a(n)=my(t);while(n>1,t++;n=pr(n));t

Formula

a(0) = a(1) = 0; for n > 1, a(n) = 1 + a(A208575(n)). - Antti Karttunen, Nov 14 2018

A245760 Maximal multiplicative persistence of n in any base.

Original entry on oeis.org

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

Views

Author

Sergio Pimentel, Jul 31 2014

Keywords

Comments

It has been conjectured that there is a maximum multiplicative persistence in a given base, but it is not known if this sequence is bounded.
In fact, Theorem 1 in Lamont-Smith paper implies that this sequence is unbounded. - Brendan Gimby, Jul 12 2025

Examples

			a(23)=3 since the persistence of 23 in base 6 is 3 (23 in base 6 is 35 / 3x5=15 / 15 in base 6 is 23 / 2x3=6 / 6 in base 6 is 10 / 1x0=0 which is a single digit). In any other base the persistence of 23 is 3 or less, therefore a(23)=3.
a(12)=1 since 12 does not have a multiplicative persistence greater than 1 in any base.
		

Crossrefs

Programs

  • Maple
    persistence:= proc(n,b) local i,m;
      m:= n;
      for i from 1 do
           m:= convert(convert(m,base,b),`*`);
         if m < b then return i fi
      od:
    end proc:
    A:= n -> max(seq(persistence(n,b),b=2..n-1)):
    0, 1, seq(A(n),n=3..100); # Robert Israel, Jul 31 2014
  • Mathematica
    persistence[n_, b_] := Module[{i, m}, m = n; For[i = 1, True, i++, m = Times @@ IntegerDigits[m, b]; If[m < b, Return [i]]]];
    A[n_] := Max[Table[persistence[n, b], {b, 2, n-1}]];
    Join[{0, 1}, Table[A[n], {n, 3, 100}]] (* Jean-François Alcover, Apr 30 2019, after Robert Israel *)

A381965 Irregular triangle read by rows, where row n lists the iterates of f(x), starting at x = n until f(x) < 10, where f(x) is the multiplicative digital root of x (A031347).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 11, 1, 12, 2, 13, 3, 14, 4, 15, 5, 16, 6, 17, 7, 18, 8, 19, 9, 20, 0, 21, 2, 22, 4, 23, 6, 24, 8, 25, 10, 0, 26, 12, 2, 27, 14, 4, 28, 16, 6, 29, 18, 8, 30, 0, 31, 3, 32, 6, 33, 9, 34, 12, 2, 35, 15, 5, 36, 18, 8, 37, 21, 2
Offset: 0

Views

Author

Paolo Xausa, Mar 11 2025

Keywords

Examples

			Triangle begins:
  n\k|  0   1   2
  ---------------
   0 |  0;
   1 |  1;
   2 |  2;
   3 |  3;
   4 |  4;
   5 |  5;
   6 |  6;
   7 |  7;
   8 |  8;
   9 |  9;
  10 | 10,  0;
  11 | 11,  1;
  12 | 12,  2;
  13 | 13,  3;
  14 | 14,  4;
  15 | 15,  5;
  16 | 16,  6;
  17 | 17,  7;
  18 | 18,  8;
  19 | 19,  9;
  20 | 20,  0;
  21 | 21,  2;
  22 | 22,  4;
  23 | 23,  6;
  24 | 24,  8;
  25 | 25, 10,  0;
  ...
		

Crossrefs

Cf. A031346 (row lengths - 1), A031347 (right border), A381966 (row sums).

Programs

  • Mathematica
    A381965row[n_] := NestWhileList[Times @@ IntegerDigits[#] &, n, # >= 10 &];
    Array[A381965row, 50, 0]

Formula

T(n,0) = n and, for k = 1..A031346(n), T(n,k) = A031347(T(n,k-1)).

A125582 Smallest positive integer with multiplicative persistence n in base 12.

Original entry on oeis.org

1, 12, 30, 46, 83, 1099, 1571, 17902874277
Offset: 0

Views

Author

Walter Kehowski, Jan 04 2007

Keywords

Comments

The sequence in base 12 is 1, 10, 26, 3X, 6E, 777, XXE, 3577777799, where X is 10 and E is 11. I have searched numbers up to 24 digits in base 12 excluding any numbers that might contain the digit 1 or any combination of digits that might multiply to 0 mod 12. The numbers also had digits in nondecreasing order, so that XXE would be tested but, for example, EXX would not.

Examples

			a(0)=1 since 1 is the smallest positive integer for which no multiplication takes place. [Edited by _A.H.M. Smeets_, Sep 16 2018]
a(6)=1571 since 1571, 1100, 392, 128, 80, 48, 0 is the chain with six multiplications. In base 12, XXE, 778, 288, X8, 68, 40, 0.
		

Crossrefs

Programs

  • Maple
    Maple program available upon request.
  • Mathematica
    With[{s = Array[-1 + Length@ FixedPointList[Times @@ IntegerDigits[#, 12] &, #] &, 1600]}, Array[FirstPosition[s, #][[1]] &, Max@ s]] (* Michael De Vlieger, Sep 18 2018 *)

A208277 Smallest number of multiplicative persistence n in factorial base.

Original entry on oeis.org

0, 2, 5, 633, 443153013
Offset: 0

Views

Author

Keywords

Comments

a(n) exists for all n, unlike (conjecturally) its decimal equivalent A003001. In particular, with k = a(n-1), a(n) <= k * k! + (k-1)! + ... + 2! + 1! < (a(n-1)+1)! for n > 1. Diamond & Reidpath ask if this upper bound can be improved.
a(5) <= 255429978433810461138446192454297813.

Examples

			5 = 1*1!+2*2!, and so is 21 in factorial base; the product of its digits is 2*1 = 10_! and the product of its digits in factorial base is 0*1 = 0, so 5 has multiplicative persistence 2. Since it is the smallest, a(2) = 5.
633 = 51111_! -> 21_! -> 10_! -> 0_! is the least chain of length 3 and so a(3) = 633.
		

Crossrefs

Programs

  • PARI
    pr(n)=my(k=1,s=1);while(n,s*=n%k++;n\=k);s
    persist(n)=my(t); while(n>1, t++; n=pr(n)); t
    a(n)=my(k=0);while(persist(k)!=n, k++); k \\ Charles R Greathouse IV, Jan 21 2013

A070560 a(0) = 1; for n > 0, a(n) = (fecundity of n) + 2.

Original entry on oeis.org

1, 12, 11, 11, 10, 3, 10, 9, 9, 8, 2, 10, 9, 9, 8, 3, 8, 8, 7, 5, 2, 7, 7, 6, 7, 4, 6, 7, 4, 5, 2, 5, 6, 4, 4, 3, 5, 5, 5, 4, 2, 6, 3, 4, 3, 5, 3, 4, 3, 6, 2, 7, 5, 10, 4, 3, 6, 4, 4, 3, 2, 4, 4, 7, 7, 4, 3, 3, 9, 7, 2, 6, 6, 4, 3, 3, 8, 7, 5, 4, 2, 6, 4, 3, 9, 5, 5, 5, 6, 5, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Comments

Start with n, repeatedly replace x by x + product of digits of x until reach 0; fecundity = number of steps - 1.

Examples

			1 -> 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 -> 102 -> 0 has fecundity 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n]; f[0] = 1; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)

Extensions

More terms from Robert G. Wilson v, Jun 27 2010

A070561 a(0) = 0; for n > 0, a(n) = (fecundity of n) + 1.

Original entry on oeis.org

0, 11, 10, 10, 9, 2, 9, 8, 8, 7, 1, 9, 8, 8, 7, 2, 7, 7, 6, 4, 1, 6, 6, 5, 6, 3, 5, 6, 3, 4, 1, 4, 5, 3, 3, 2, 4, 4, 4, 3, 1, 5, 2, 3, 2, 4, 2, 3, 2, 5, 1, 6, 4, 9, 3, 2, 5, 3, 3, 2, 1, 3, 3, 6, 6, 3, 2, 2, 8, 6, 1, 5, 5, 3, 2, 2, 7, 6, 4, 3, 1, 5, 3, 2, 8, 4, 4, 4, 5, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Comments

Start with n, repeatedly replace x by x + product of digits of x until the product of digits reaches 0; fecundity = number of steps - 1.
Equivalently, with A230099 = f, a(n) is the number k of distinct values that are obtained with iterations: n, f(n), f(f(n)), f(f(f(n))), ... until a term of this sequence contains a 0. - Bernard Schott, Jul 31 2023

Examples

			1 -> 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 ->102 -> 102 -> ... has fecundity 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 1; f[0] = 0; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)

Formula

a(n) = 1 iff n positive is in A011540. - Bernard Schott, Jul 31 2023

Extensions

More terms from Robert G. Wilson v, Jun 27 2010

A129985 Multiplicative persistence of the prime numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			229 = prime(50) -> 2*2*9 = 36 -> 3*6 = 18 -> 1*8 = 8 -> persistence(229) = 3 = a(50).
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,w,ok,cont,x; for i from 1 by 1 to n do k:=ithprime(i); w:=1; ok:=1; x:=k; 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);
  • Mathematica
    s={};Do[i=0;m=Prime[n];While[m!=Times@@IntegerDigits[m],m=Times@@IntegerDigits[m];i++];AppendTo[s,i],{n,100}];s (* James C. McMahon, Feb 03 2025 *)

Formula

a(n) = A031346(A000040(n)). - Alois P. Heinz, Feb 03 2025

Extensions

Offset corrected by Alois P. Heinz, Feb 03 2025

A130543 Multiplicative persistence of n!.

Original entry on oeis.org

0, 0, 0, 0, 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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

From 5! on all the factorials end with "zero" thus the persistence is equal to 1.
Decimal expansion of 1/90000. - Elmo R. Oliveira, May 05 2024

Examples

			0!=1; 1!=1; 2!=2; 3!=6 --> Persistence=0
4!=24 --> 2*4=8 --> Persistence=1
5!=120 --> 1*2*0=0 --> Persistence=1
		

Crossrefs

Programs

  • Maple
    P:=proc(n)local i,k,w,ok,cont; for i from 0 by 1 to n do w:=1;k:=i!;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);

Formula

From Elmo R. Oliveira, Jul 16 2024: (Start)
G.f.: x^4/(1-x).
a(n) = 1 for n >= 4.
a(n) = 1 - A329678(n) = A185115(n+1). (End)

A131836 Multiplicative persistence of the Sierpinski numbers of the first kind (n^n + 1).

Original entry on oeis.org

0, 0, 2, 2, 3, 2, 2, 4, 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, 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: 1

Views

Author

Keywords

Comments

Question: Are there any terms larger than 1 after a(22) = 2? In other words, do all terms of A014566 contain zero somewhere in their decimal representation after A014566(22) = 341427877364219557396646723585? - Antti Karttunen, Oct 08 2017

Examples

			For n=4 we have A014566(4) = Sierpinski number 257 --> 2*5*7 = 70 --> 7*0 = 0 thus persistence = 2, and a(4) = 2. - Edited by _Antti Karttunen_, Oct 08 2017
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,w,ok,cont; for i from 1 by 1 to n do w:=1; k:=i^i+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);
  • Mathematica
    Table[-1 + Length@ NestWhileList[Times @@ IntegerDigits@ # &, If[n == 0, 2, n^n + 1], # > 9 &], {n, 105}] (* Michael De Vlieger, Oct 08 2017 *)
  • Scheme
    ;; The whole program follows:
    (define (A131836 n) (A031346 (A014566 n)))
    (define (A014566 n) (+ 1 (expt n n)))
    (define (A031346 n) (let loop ((n n) (k 0)) (if (< n 10) k (loop (A007954 n) (+ 1 k)))))
    (define (A007954 n) (if (zero? n) n (let loop ((n n) (m 1)) (if (zero? n) m (let ((d (modulo n 10))) (loop (/ (- n d) 10) (* d m)))))))
    ;; Antti Karttunen, Oct 08 2017

Formula

a(n) = A031346(A014566(n)). - Michel Marcus, Oct 08 2017
Previous Showing 31-40 of 57 results. Next