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.

A275948 Number of nonzero digits that occur only once in factorial base representation of n: a(n) = A056169(A275735(n)).

This page as a plain text file.
%I A275948 #22 Feb 07 2024 01:17:58
%S A275948 0,1,1,0,1,2,1,0,0,0,2,1,1,2,2,1,0,1,1,2,2,1,2,3,1,0,0,0,2,1,0,0,0,0,
%T A275948 1,1,2,1,1,1,1,0,2,1,1,1,3,2,1,2,2,1,0,1,2,1,1,1,1,0,0,1,1,0,0,1,2,3,
%U A275948 3,2,1,2,1,2,2,1,2,3,2,1,1,1,3,2,2,3,3,2,1,2,0,1,1,0,1,2,1,2,2,1,2,3,2,1,1,1,3,2,2,3,3,2,1,2,2,3,3,2,3,4,1
%N A275948 Number of nonzero digits that occur only once in factorial base representation of n: a(n) = A056169(A275735(n)).
%H A275948 Antti Karttunen, <a href="/A275948/b275948.txt">Table of n, a(n) for n = 0..40320</a>
%H A275948 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>.
%F A275948 a(n) = A056169(A275735(n)).
%F A275948 Other identities. For all n >= 0.
%F A275948 a(n) = A275946(A225901(n)).
%F A275948 A275806(n) = a(n) + A275949(n).
%F A275948 A060130(n) = a(n) + A275964(n).
%e A275948 For n=0, with factorial base representation (A007623) also 0, there are no nonzero digits, thus a(0) = 0.
%e A275948 For n=2, with factorial base representation "10", there is one nonzero digit, thus a(2) = 1.
%e A275948 For n=3 (= "11") there is no nonzero digit which would occur just once, thus a(3) = 0.
%e A275948 For n=23 (= "321") there are three nonzero digits and each of those digits occurs just once, thus a(23) = 3.
%e A275948 For n=44 (= "1310") there are two distinct nonzero digits ("1" and "3"), but only the other (3) occurs just once, thus a(44) = 1.
%t A275948 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 07 2024 *)
%o A275948 (Scheme) (define (A275948 n) (A056169 (A275735 n)))
%o A275948 (Python)
%o A275948 from sympy import prime, factorint
%o A275948 from operator import mul
%o A275948 from functools import reduce
%o A275948 import collections
%o A275948 def a056169(n):
%o A275948     f=factorint(n)
%o A275948     return 0 if n==1 else sum([1 for i in f if f[i]==1])
%o A275948 def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
%o A275948 def a275735(n):
%o A275948     y=collections.Counter(map(int, list(str(a007623(n)).replace("0", "")))).most_common()
%o A275948     return 1 if n==0 else reduce(mul, [prime(y[i][0])**y[i][1] for i in range(len(y))])
%o A275948 def a(n): return a056169(a275735(n))
%o A275948 print([a(n) for n in range(201)]) # _Indranil Ghosh_, Jun 20 2017
%Y A275948 Cf. A056169, A275735.
%Y A275948 Cf. also A060130, A225901, A275806, A275946, A275949, A275964.
%K A275948 nonn,base
%O A275948 0,6
%A A275948 _Antti Karttunen_, Aug 15 2016