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-10 of 11 results. Next

A286590 Numbers that are divisible by the product of their factorial base digits (A208575).

Original entry on oeis.org

1, 3, 9, 21, 33, 45, 81, 153, 165, 201, 393, 405, 441, 645, 873, 885, 921, 1113, 1125, 1161, 1365, 2313, 2565, 3765, 4005, 5913, 5925, 5961, 6153, 6165, 6201, 6405, 7353, 7641, 8805, 9045, 15993, 16281, 17433, 26085, 26325, 36393, 36645, 46233, 46245, 46281, 46473, 46485, 46521, 46725, 47673
Offset: 1

Views

Author

Antti Karttunen, Jun 18 2017

Keywords

Comments

After the initial 1, all terms are multiples of three.

Crossrefs

Cf. A007489 (a subsequence), A208575, A118363.
Cf. A007602 (for base-10 analog).

Programs

  • Mathematica
    max = 8; Select[Range[max!], FreeQ[(d = IntegerDigits[#, MixedRadix[Range[max, 2, -1]]]), 0] && Divisible[#, Times @@ d] &] (* Amiram Eldar, Feb 16 2021 *)

A227157 Numbers k whose factorial base representation A007623(k) does not contain any nonleading zeros.

Original entry on oeis.org

1, 3, 5, 9, 11, 15, 17, 21, 23, 33, 35, 39, 41, 45, 47, 57, 59, 63, 65, 69, 71, 81, 83, 87, 89, 93, 95, 105, 107, 111, 113, 117, 119, 153, 155, 159, 161, 165, 167, 177, 179, 183, 185, 189, 191, 201, 203, 207, 209, 213, 215, 225, 227, 231, 233, 237, 239, 273
Offset: 1

Views

Author

Antti Karttunen, Jul 04 2013

Keywords

Comments

a(A003422(n)) = A007489(n).
a(A007489(n)) = (n+1)!-1 thus A007489(n) gives the number of terms less than (n+1)! in this sequence.
Equivalently, there are n! terms in the sequence with their magnitude in range n!..(n+1)!.
Also numbers k such that A304036(k) = 1 for k > 0. - Seiichi Manyama, May 06 2018

Crossrefs

The sequence gives all n for which A208575(n) is not zero. Complement of A227187. Subsets: A071156 (apart from zero), A231716, A231720.

Programs

  • Mathematica
    q[n_] := Module[{k = n, m = 2, c = 0, r}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, If[r == 0, c++]; m++]; c == 0]; Select[Range[300], q] (* Amiram Eldar, Jan 23 2024 *)

A227153 Product of nonzero digits of n in factorial base.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 3, 3, 3, 3, 6, 6, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 3, 3, 3, 3, 6, 6, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 8, 8, 6, 6, 6, 6, 12, 12, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6
Offset: 0

Views

Author

Antti Karttunen, Jul 04 2013

Keywords

Comments

a(0) = 1 as an empty product always gives 1.

Crossrefs

A227157 gives the positions where equal with A208575.

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, p = 1}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, If[r > 0, p *= r]; m++]; p]; Array[a, 100, 0] (* Amiram Eldar, Feb 07 2024 *)
  • Python
    from functools import reduce
    from operator import mul
    def A(n, p=2):
        return n if n
  • Python
    def a(n, k=2): return max(n % k, 1) * a(n // k, k + 1) if n else 1 # David Radcliffe, May 22 2025

Formula

For all n, a(A227157(n)) = A208575(A227157(n)).

A227154 Product of digits+1 of n in factorial base.

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 2, 4, 4, 8, 6, 12, 3, 6, 6, 12, 9, 18, 4, 8, 8, 16, 12, 24, 2, 4, 4, 8, 6, 12, 4, 8, 8, 16, 12, 24, 6, 12, 12, 24, 18, 36, 8, 16, 16, 32, 24, 48, 3, 6, 6, 12, 9, 18, 6, 12, 12, 24, 18, 36, 9, 18, 18, 36, 27, 54, 12, 24, 24, 48, 36, 72, 4, 8, 8
Offset: 0

Views

Author

Antti Karttunen, Jul 04 2013

Keywords

Examples

			5 has factorial base representation A007623(5) = "21" (as 2*2 + 1*1 = 5). Adding one to these digits and multiplying, we get 3*2 = 6, thus a(5)=6.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, p = 1}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, p *= (r+1); m++]; p]; Array[a, 100, 0] (* Amiram Eldar, Feb 13 2024 *)
  • PARI
    a(n)=my(b=2,t=1); while(n, t *= n%b + 1; n \= b; b++); t \\ Charles R Greathouse IV, Jun 06 2017

Extensions

a(0)=1 added by Tom Edgar, Jun 05 2017

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

A227187 Numbers n whose factorial base representation A007623(n) contains at least one nonleading zero. (Zero is also included as a(0)).

Original entry on oeis.org

0, 2, 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 36, 37, 38, 40, 42, 43, 44, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 60, 61, 62, 64, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 84, 85, 86, 88, 90, 91
Offset: 0

Views

Author

Antti Karttunen, Jul 04 2013

Keywords

Crossrefs

Complement: A227157.
The sequence gives all positions n where A208575 is zero and all terms where A257510 (also A257260) are nonzeros.
Cf. A232745 (a subsequence), A232744.
Cf. also A007623, A132371, A153880, A227130, A227132, A256450 (numbers with at least one 1 in their factorial representation).

Programs

  • Mathematica
    q[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; MemberQ[s, 0]]; q[0] = True; Select[Range[0, 100], q] (* Amiram Eldar, Feb 07 2024 *)

Formula

a(0) = 0, a(1) = 2, and for n > 1, if a(n-1) is odd or A257510(a(n-1)) > 1, then a(n) = a(n-1) + 1, otherwise a(n) = a(n-1) + 2. - Antti Karttunen, Apr 29 2015
Other identities:
For all n >= 2, a(A132371(n)) = A000142(n) = n! [See comments in A227157.]

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

A231715 For n with a unique factorial base representation n = du*u! + ... + d2*2! + d1*1! (each di in range 0..i, cf. A007623), a(n) = Product_{i=1..u} (gcd(d_i,i+1) mod i+1), where u is given by A084558(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Examples

			For n=13, with factorial base representation '201' (= A007623(13), 2*3! + 0*2! + 1*1! = 13) we have, starting from the least significant digit, (gcd(1,2) mod 2)*(gcd(0,3) mod 3)*(gcd(2,4) mod 4) = (1 mod 2)*(3 mod 3)*(2 mod 4) = 1*0*2 = 0, thus a(13)=0.
For n=17, with factorial base representation '221' (= A007623(17), 2*3! + 2*2! + 1*1! = 17) we have, starting from the least significant digit, (gcd(1,2) mod 2)*(gcd(2,3) mod 3)*(gcd(2,4) mod 4) = (1 mod 2)*(1 mod 3)*(2 mod 4) = 1*1*2 = 2, thus a(17)=2.
		

Crossrefs

Cf. A231716 (positions of ones), A227157 (the positions of nonzero terms), A007623.
Each a(n) <= A208575(n).

Programs

  • Scheme
    (define (A231715 n) (let loop ((n n) (i 2) (p 1)) (cond ((zero? n) p) (else (loop (floor->exact (/ n i)) (+ i 1) (* p (modulo (gcd (modulo n i) i) i)))))))

A263130 Least number such that the product of its digits in factorial base is n.

Original entry on oeis.org

1, 5, 21, 17, 633, 23, 36153, 65, 93, 635, 443122713, 71, 81474226713, 36155, 645, 113, 6069010670156313, 95, 2318037293294156313, 641, 36165, 443122715, 595774037991797891660313, 119, 4233, 81474226715, 453, 36161, 256727294482662730300616548940313, 647
Offset: 1

Views

Author

Paul Tek, Oct 10 2015

Keywords

Comments

The product of digits in factorial base is given by A208575.
All terms are odd.
Each prime number sets a new record.
a(p) = p*(p!) + Sum_{k=1..p-1} k! for any prime p.
a(n!) = A033312(n+1) for any n>0.
A208576(a(n)) = A208576(n)+1 for any n>1.

Examples

			The first terms of the sequence are:
+----+-------------+----------------------------+
| n  | a(n)        | a(n) in factorial base     |
+----+-------------+----------------------------+
|  1 |           1 |                          1 |
|  2 |           5 |                        2_1 |
|  3 |          21 |                      3_1_1 |
|  4 |          17 |                      2_2_1 |
|  5 |         633 |                  5_1_1_1_1 |
|  6 |          23 |                      3_2_1 |
|  7 |       36153 |              7_1_1_1_1_1_1 |
|  8 |          65 |                    2_2_2_1 |
|  9 |          93 |                    3_3_1_1 |
| 10 |         635 |                  5_1_1_2_1 |
| 11 |   443122713 |     11_1_1_1_1_1_1_1_1_1_1 |
| 12 |          71 |                    2_3_2_1 |
| 13 | 81474226713 | 13_1_1_1_1_1_1_1_1_1_1_1_1 |
| 14 |       36155 |              7_1_1_1_1_2_1 |
| 15 |         645 |                  5_1_3_1_1 |
| 16 |         113 |                    4_2_2_1 |
+----+-------------+----------------------------+
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = Divisors@ n, g, k, m = {1}}, g[x_] := Flatten[Table[#1, {#2}] & @@@ FactorInteger@ x]; Do[k = Max@ Select[d, # <= i &]; If[! IntegerQ@ k, AppendTo[m, 1], d = Divisors[Last[d]/k]; AppendTo[m, k]]; If[d == {1}, Break[]], {i, 2, n}]; Reverse@ m]; Table[FromDigits[#, MixedRadix[Reverse@ Range[2, Length@ #]]] &@ f@ n, {n, 30}] (* Michael De Vlieger, Oct 12 2015, Version 10.2 *)

A301652 Triangle read by rows: row n gives the digits of n in factorial base in reversed order.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Mar 25 2018

Keywords

Comments

Row n gives exponents for successive primes 2, 3, 5, 7, 11, etc., in the prime factorization of A276076(n). - Antti Karttunen, Mar 11 2024

Examples

			   n | 1  2  6
  ---+---------
   0 | 0;
   1 | 1;
   2 | 0, 1;
   3 | 1, 1;
   4 | 0, 2;
   5 | 1, 2;
   6 | 0, 0, 1;
   7 | 1, 0, 1;
   8 | 0, 1, 1;
   9 | 1, 1, 1;
  10 | 0, 2, 1;
  11 | 1, 2, 1;
  12 | 0, 0, 2;
  13 | 1, 0, 2;
  14 | 0, 1, 2;
  15 | 1, 1, 2;
  16 | 0, 2, 2;
  17 | 1, 2, 2;
  18 | 0, 0, 3;
  19 | 1, 0, 3;
		

Crossrefs

Triangle A108731 with rows reversed.
Cf. A007623, A034968 (row sums), A208575 (row products), A227153 (products of nonzero terms on row n), A276076, A301593.

Programs

  • Mathematica
    row[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, AppendTo[s, r]; m++]; s]; row[0] = {0}; Array[row, 31, 0] // Flatten (* Amiram Eldar, Mar 11 2024 *)
  • Sage
    terms=25; print([0]+[x for sublist in [[floor(n/factorial(i))%(i+1) for i in [k for k in [1..n] if factorial(k)<=n]] for n in [1..terms]] for x in sublist]) # Tom Edgar, Aug 15 2018

Formula

T(n,k) = floor(n/k!) mod k+1. - Tom Edgar, Aug 15 2018
Showing 1-10 of 11 results. Next