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.

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

This page as a plain text file.
%I A264990 #34 Mar 05 2025 05:25:15
%S A264990 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,
%T A264990 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,
%U A264990 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
%N A264990 a(n) = number of occurrences of a most frequent nonzero digit in factorial base representation (A007623) of n.
%H A264990 Antti Karttunen, <a href="/A264990/b264990.txt">Table of n, a(n) for n = 0..10080</a>
%H A264990 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>.
%F A264990 a(0) = 0; for n >= 1, a(n) = max(A257511(n), a(A257684(n))).
%F A264990 Other identities. For all n >= 0:
%F A264990 From _Antti Karttunen_, Aug 15 2016: (Start)
%F A264990 a(n) = A275811(A225901(n)).
%F A264990 a(n) = A051903(A275735(n)).
%F A264990 (End)
%e A264990    n  A007623(n)   a(n) [highest number of times any nonzero digit occurs].
%e A264990    0 =   0           0 (because no nonzero digits present)
%e A264990    1 =   1           1
%e A264990    2 =  10           1
%e A264990    3 =  11           2
%e A264990    4 =  20           1
%e A264990    5 =  21           1
%e A264990    6 = 100           1
%e A264990    7 = 101           2
%e A264990    8 = 110           2
%e A264990    9 = 111           3
%e A264990   10 = 120           1
%e A264990   11 = 121           2
%e A264990   12 = 200           1
%e A264990   13 = 201           1
%e A264990   14 = 210           1
%e A264990   15 = 211           2
%e A264990   16 = 220           2
%e A264990   17 = 221           2
%e A264990   18 = 300           1
%e A264990 and for n=63 we have:
%e A264990   63 = 2211          2.
%t A264990 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 *)
%o A264990 (Scheme with memoization-macro definec)
%o A264990 (definec (A264990 n) (if (zero? n) n (max (A257511 n) (A264990 (A257684 n)))))
%o A264990 (Python)
%o A264990 from sympy import prime, factorint
%o A264990 from operator import mul
%o A264990 import collections
%o A264990 def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
%o A264990 def a051903(n): return 0 if n==1 else max(factorint(n).values())
%o A264990 def a275735(n):
%o A264990     y=collections.Counter(map(int, list(str(a007623(n)).replace("0", "")))).most_common()
%o A264990     return 1 if n==0 else reduce(mul, [prime(y[i][0])**y[i][1] for i in range(len(y))])
%o A264990 def a(n): return 0 if n==0 else a051903(a275735(n))
%o A264990 print([a(n) for n in range(201)]) # _Indranil Ghosh_, Jun 20 2017
%Y A264990 Cf. A007623, A051903, A225901, A257511, A257684, A275735, A275811.
%Y A264990 Cf. A265349 (positions of terms <= 1), A265350 (positions of term > 1).
%Y A264990 Cf. also A266117, A266118.
%K A264990 nonn,base
%O A264990 0,4
%A A264990 _Antti Karttunen_, Dec 22 2015
%E A264990 Name changed by _Antti Karttunen_, Aug 15 2016