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.

A329344 Number of times most frequent primorial is present in the greedy sum of primorials adding to A108951(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 6, 2, 1, 2, 1, 4, 6, 2, 1, 3, 4, 2, 1, 4, 1, 5, 1, 1, 6, 2, 8, 4, 1, 2, 6, 1, 1, 1, 1, 4, 5, 2, 1, 3, 6, 8, 6, 4, 1, 2, 4, 8, 6, 2, 1, 3, 1, 2, 3, 2, 13, 12, 1, 4, 6, 5, 1, 3, 1, 2, 5, 4, 16, 12, 1, 2, 6, 2, 1, 2, 11, 2, 6, 8, 1, 10, 12, 4, 6, 2, 7, 6, 1, 12, 10, 6, 1, 12, 1, 8, 4
Offset: 1

Views

Author

Antti Karttunen, Nov 11 2019

Keywords

Comments

The greedy sum is also the sum with the minimal number of primorials, used for example in the primorial base representation.

Examples

			For n = 24 = 2^3 * 3, A108951(24) = A034386(2)^3 * A034386(3) = 2^3 * 6 = 48 = 30 + 6 + 6 + 6, and as the most frequent primorial in the sum is 6 = A002110(2), we have a(24) = 3.
		

Crossrefs

Programs

  • Mathematica
    With[{b = Reverse@ Prime@ Range@ 120}, Array[Max@ IntegerDigits[#, MixedRadix[b]] &@ Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]] &, 105] ] (* Michael De Vlieger, Nov 18 2019 *)
  • PARI
    A034386(n) = prod(i=1, primepi(n), prime(i));
    A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) };  \\ From A108951
    A328114(n) = { my(s=0, p=2); while(n, s = max(s,(n%p)); n = n\p; p = nextprime(1+p)); (s); };
    A329344(n) = A328114(A108951(n));
    
  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A324886(n) = A276086(A108951(n));
    A051903(n) = if((1==n),0,vecmax(factor(n)[, 2]));
    A329344(n) = A051903(A324886(n));

Formula

a(n) = A328114(A108951(n)) = A051903(A324886(n)).