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.

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).