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

A266117 Lexicographically first injection of positive integers beginning with a(1) such that a(n)*a(n+1) is a term of A265349, i.e., has no multiple occurrences of any nonzero digit when viewed in factorial base (A007623).

Original entry on oeis.org

1, 2, 3, 4, 5, 10, 11, 6, 7, 12, 8, 9, 24, 13, 18, 19, 26, 14, 17, 22, 21, 16, 15, 32, 30, 20, 23, 29, 42, 28, 25, 48, 34, 53, 41, 54, 27, 40, 33, 36, 37, 61, 65, 44, 49, 72, 39, 38, 51, 52, 55, 59, 47, 46, 58, 50, 60, 62, 31, 66, 56, 57, 64, 45, 80, 63, 74, 69, 68, 35, 79, 100, 73, 43, 67, 70, 71, 78, 84, 87, 92, 90, 76, 96, 75
Offset: 1

Views

Author

Antti Karttunen, Dec 22 2015

Keywords

Comments

After a(1) = 1, always choose for a(n+1) the least unused k such that in factorial base representation (A007623), the product a(n)*a(n+1) will not show any of the nonzero digits present twice (or more times), regardless of the positions of the digits.

Examples

			For n = 6, we start searching from the least not yet used number in range a(1) .. a(5) [which is 6, because all the previous terms are fixed] for the first number whose product with a(5) = 5 results a number in A265349.
Multiplying 5 (in factorial base "21") with 6 (in factorial base "100") results 30, which in factorial base is "1100", containing digit "1" twice, thus 6 is disqualified.
Similarly, products 5*7, 5*8 and 5*9 result 35 = "1121", 40 = "1220" and 45 = "1311", where in all cases one of the nonzero digits occur more than once, so 7, 8 and 9 are also all disqualified.
But 5*10 = 50, which has a factorial base representation ("2010") that matches the criterion, thus a(6) = 10.
		

Crossrefs

Left inverse: A266118 (also the right inverse if this sequence is a permutation of the positive integers).
Cf. also A266121, A266191 and A266195 for similar permutations.

A275735 Prime-factorization representations of "factorial base level polynomials": a(0) = 1; for n >= 1, a(n) = 2^A257511(n) * A003961(a(A257684(n))).

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 2, 4, 4, 8, 6, 12, 3, 6, 6, 12, 9, 18, 5, 10, 10, 20, 15, 30, 2, 4, 4, 8, 6, 12, 4, 8, 8, 16, 12, 24, 6, 12, 12, 24, 18, 36, 10, 20, 20, 40, 30, 60, 3, 6, 6, 12, 9, 18, 6, 12, 12, 24, 18, 36, 9, 18, 18, 36, 27, 54, 15, 30, 30, 60, 45, 90, 5, 10, 10, 20, 15, 30, 10, 20, 20, 40, 30, 60, 15, 30, 30, 60, 45, 90, 25, 50, 50, 100, 75
Offset: 0

Views

Author

Antti Karttunen, Aug 09 2016

Keywords

Comments

These are prime-factorization representations of single-variable polynomials where the coefficient of term x^(k-1) (encoded as the exponent of prime(k) in the factorization of n) is equal to the number of times a nonzero digit k occurs in the factorial base representation of n. See the examples.

Examples

			For n = 0 whose factorial base representation (A007623) is also 0, there are no nonzero digits at all, thus there cannot be any prime present in the encoding, and a(0) = 1.
For n = 1 there is just one 1, thus a(1) = prime(1) = 2.
For n = 2 ("10"), there is just one 1-digit, thus a(2) = prime(1) = 2.
For n = 3 ("11") there are two 1-digits, thus a(3) = prime(1)^2 = 4.
For n = 18 ("300") there is just one 3, thus a(18) = prime(3) = 5.
For n = 19 ("301") there is one 1 and one 3, thus a(19) = prime(1)*prime(3) = 2*5 = 10.
For n = 141 ("10311") there are three 1's and one 3, thus a(141) = prime(1)^3 * prime(3) = 2^3 * 5^1 = 40.
		

Crossrefs

Cf. also A275725, A275733, A275734 for other such prime factorization encodings of A060117/A060118-related polynomials, and also A276076.
Differs from A227154 for the first time at n=18, where a(18) = 5, while A227154(18) = 4.

Programs

  • PARI
    A276076(n) = { my(i=0,m=1,f=1,nextf); while((n>0),i=i+1; nextf = (i+1)*f; if((n%nextf),m*=(prime(i)^((n%nextf)/f));n-=(n%nextf));f=nextf); m; };
    A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));
    A275735(n) = A181819(A276076(n)); \\ Antti Karttunen, Apr 03 2022
  • Python
    from sympy import prime
    from operator import mul
    import collections
    def a007623(n, p=2): return n if n

Formula

a(0) = 1; for n >= 1, a(n) = 2^A257511(n) * A003961(a(A257684(n))).
Other identities and observations. For all n >= 0:
a(n) = A275734(A225901(n)).
A001221(a(n)) = A275806(n).
A001222(a(n)) = A060130(n).
A048675(a(n)) = A275729(n).
A051903(a(n)) = A264990(n).
A008683(a(A265349(n))) = -1 or +1 for all n >= 0.
A008683(a(A265350(n))) = 0 for all n >= 1.
From Antti Karttunen, Apr 03 2022: (Start)
A342001(a(n)) = A351954(n).
a(n) = A181819(A276076(n)). (End)

A275806 a(n) = number of distinct nonzero digits in factorial base representation of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 11 2016

Keywords

Examples

			For n=0, with factorial base representation (A007623) also 0, there are no nonzero digits, thus a(0) = 0.
For n=2, with factorial base representation "10", there is one distinct nonzero digit, thus a(2) = 1.
For n=3, with factorial base representation "11", there is just one distinct nonzero digit, thus a(3) = 1.
For n=44, with factorial base representation "1310", there are two distinct nonzero digits ("1" and "3"), thus a(44) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Length[Union[Select[s, # > 0 &]]]]; Array[a, 100, 0] (* Amiram Eldar, Feb 07 2024 *)
  • Python
    from sympy import prime, primefactors
    from operator import mul
    import collections
    def a007623(n, p=2): return n if n
  • Scheme
    (define (A275806 n) (A001221 (A275735 n)))
    

Formula

a(n) = A001221(A275735(n)).
a(n) = A060502(A225901(n)).
Other identities. For all n >= 0:
a(n) = a(A153880(n)) = a(A255411(n)). [The shift-operations do not change the number of distinct nonzero digits.]
a(A265349(n)) = A060130(A265349(n)).
a(A000142(n)) = 1.
a(A033312(n)) = n-1, for all n >= 1.

A264990 a(n) = number of occurrences of a most frequent nonzero digit in factorial base representation (A007623) of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 22 2015

Keywords

Examples

			   n  A007623(n)   a(n) [highest number of times any nonzero digit occurs].
   0 =   0           0 (because no nonzero digits present)
   1 =   1           1
   2 =  10           1
   3 =  11           2
   4 =  20           1
   5 =  21           1
   6 = 100           1
   7 = 101           2
   8 = 110           2
   9 = 111           3
  10 = 120           1
  11 = 121           2
  12 = 200           1
  13 = 201           1
  14 = 210           1
  15 = 211           2
  16 = 220           2
  17 = 221           2
  18 = 300           1
and for n=63 we have:
  63 = 2211          2.
		

Crossrefs

Cf. A265349 (positions of terms <= 1), A265350 (positions of term > 1).
Cf. also A266117, A266118.

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Max[Tally[Select[s, # > 0 &]][[;;,2]]]]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jan 24 2024 *)
  • Python
    from sympy import prime, factorint
    from operator import mul
    import collections
    def a007623(n, p=2): return n if n

Formula

a(0) = 0; for n >= 1, a(n) = max(A257511(n), a(A257684(n))).
Other identities. For all n >= 0:
From Antti Karttunen, Aug 15 2016: (Start)
a(n) = A275811(A225901(n)).
a(n) = A051903(A275735(n)).
(End)

Extensions

Name changed by Antti Karttunen, Aug 15 2016

A275964 Total number of nonzero digits with multiple occurrences in factorial base representation of n (counted with multiplicity): a(n) = A275812(A275735(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 15 2016

Keywords

Examples

			For n=0, with factorial base representation (A007623) also 0, there are no nonzero digits, thus a(0) = 0.
For n=2, with factorial base representation "10", there are no nonzero digits that are present multiple times, thus a(2) = 0.
For n=3 ("11") there is one nonzero digit which occurs more than once, and it occurs two times in total, thus a(3) = 2.
For n=41 ("1221") there are two distinct nonzero digits ("1" and "2"), and both occur more than once, namely twice each, thus a(41) = 2+2 = 4.
For n=44 ("1310") there are two distinct nonzero digits ("1" and "3"), but only the other (1) occurs more than once (two times), thus a(44) = 2.
For n=279 ("21211") there are two distinct nonzero digits present that occur more than once, digit 2 twice, and digit 1 for three times, thus a(279) = 2+3 = 5.
		

Crossrefs

Cf. A265349 (indices of zeros), A265350 (of terms > 0).

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Total[Select[Tally[Select[s, # > 0 &]][[;;,2]], # > 1 &]]]; Array[a, 100, 0] (* Amiram Eldar, Feb 07 2024 *)
  • Scheme
    (define (A275964 n) (A275812 (A275735 n)))

Formula

a(n) = A275812(A275735(n)).
Other identities and observations. For all n >= 0.
a(n) = A275962(A225901(n)).
a(n) = A060130(n) - A275948(n).
a(n) >= A275949(n).

A265350 Numbers whose factorial base representation (A007623) contains at least one of the nonzero digits occurs more than once (although not necessarily in adjacent positions).

Original entry on oeis.org

3, 7, 8, 9, 11, 15, 16, 17, 21, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, 47, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 69, 70, 71, 75, 79, 80, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 99, 103, 104, 105, 107, 111, 112, 113, 117, 121, 122, 123, 125, 126, 127, 128, 129, 130
Offset: 1

Views

Author

Antti Karttunen, Dec 22 2015

Keywords

Comments

Positions of terms larger than ones in A264990.

Examples

			For n=7 the factorial base representation (A007623) is "101" as 7 = 3!+1! = 6+1. Digit "1" occurs twice in it, thus 7 is included in this sequence.
		

Crossrefs

Cf. A265349 (complement).
Cf. A007489, A046807 (subsequences from 3 onward).

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++]; Max[Tally[Select[s, # > 0 &]][[;;,2]]] > 1]; Select[Range[130], q] (* Amiram Eldar, Jan 24 2024 *)

A275949 Number of distinct nonzero digits that occur multiple times in factorial base representation of n: a(n) = A056170(A275735(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 15 2016

Keywords

Examples

			For n=0, with factorial base representation (A007623) also 0, there are no nonzero digits, thus a(0) = 0.
For n=2, with factorial base representation "10", there are no nonzero digits that are present multiple times, thus a(2) = 0.
For n=3 ("11") there is one distinct nonzero digit which occurs more than once, thus a(3) = 1.
For n=41 ("1221") there are two distinct nonzero digits ("1" and "2"), and both occur more than once, thus a(41) = 2.
For n=44 ( "1310") there are two distinct nonzero digits ("1" and "3"), but only the other (1) occurs more than once, thus a(44) = 1.
		

Crossrefs

Cf. A265349 (indices of zeros), A265350 (of terms > 0).

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Count[Tally[Select[s, # > 0 &]][[;;, 2]], ?(# > 1 &)]]; Array[a, 100, 0] (* _Amiram Eldar, Feb 14 2024 *)
  • Python
    from sympy import prime, factorint
    from operator import mul
    from functools import reduce
    import collections
    def a056170(n):
        f = factorint(n)
        return sum([1 for i in f if f[i]!=1])
    def a007623(n, p=2): return n if n
  • Scheme
    (define (A275949 n) (A056170 (A275735 n)))
    

Formula

a(n) = A056170(A275735(n)).
Other identities and observations. For all n >= 0.
a(n) = A275947(A225901(n)).
A275806(n) = A275948(n) + a(n).
a(n) <= A275964(n).

A381967 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the factorial base expansion of n*a(n) only contains distinct nonzero digits.

Original entry on oeis.org

0, 1, 2, 4, 3, 10, 6, 7, 9, 8, 5, 12, 11, 18, 14, 16, 15, 22, 13, 19, 23, 24, 17, 20, 21, 26, 25, 40, 39, 42, 32, 54, 30, 36, 48, 62, 33, 61, 51, 28, 27, 53, 29, 67, 49, 64, 47, 46, 34, 44, 58, 38, 55, 41, 31, 52, 57, 56, 50, 59, 60, 37, 35, 66, 45, 68, 63, 43
Offset: 0

Views

Author

Rémy Sigrist, Mar 12 2025

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
This sequence is well defined: for any n > 0 and k > n, the factorial base expansion of k!, a multiple of n, contains distinct nonzero digits (in fact: a single 1 digit).

Examples

			The first terms, alongside the factorial base expansion of n*a(n), are:
  n   a(n)  fact(n*a(n))
  --  ----  ------------
   0     0  0
   1     1  1
   2     2  2,0
   3     4  2,0,0
   4     3  2,0,0
   5    10  2,0,1,0
   6     6  1,2,0,0
   7     7  2,0,0,1
   8     9  3,0,0,0
   9     8  3,0,0,0
  10     5  2,0,1,0
  11    12  1,0,2,0,0
  12    11  1,0,2,0,0
  13    18  1,4,3,0,0
  14    14  1,3,0,2,0
  15    16  2,0,0,0,0
  16    15  2,0,0,0,0
		

Crossrefs

Cf. A265349.

Programs

  • PARI
    \\ See Links section.
Showing 1-8 of 8 results.