A324369 Product of all primes p dividing n such that the sum of the base p digits of n is at least p, or 1 if no such prime.
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 2, 1, 6, 1, 2, 1, 2, 1, 2, 1, 1, 3, 2, 1, 2, 1, 2, 3, 2, 1, 6, 1, 2, 15, 2, 1, 6, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 6, 1, 2, 3, 1, 5, 6, 1, 2, 3, 10, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 1, 2, 1, 2, 5, 2, 3, 2, 1, 10, 7, 2, 3, 2, 5, 6, 1
Offset: 1
Examples
6 = 2 * 3, and 6 = 110_2 in base 2 with 1+1+0 >= 2, but 6 = 20_3 in base 3 with 2+0 = 2 < 3, so a(6) = 2.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Bernd C. Kellner, On a product of certain primes, J. Number Theory, 179 (2017), 126-141; arXiv:1705.04303 [math.NT], 2017.
- Bernd C. Kellner and Jonathan Sondow, Power-Sum Denominators, Amer. Math. Monthly, 124 (2017), 695-709; arXiv:1705.03857 [math.NT], 2017.
- Bernd C. Kellner and Jonathan Sondow, On Carmichael and polygonal numbers, Bernoulli polynomials, and sums of base-p digits, Integers 21 (2021), #A52, 21 pp.; arXiv:1902.10672 [math.NT], 2019.
Crossrefs
Programs
-
Maple
g:= proc(n,p) convert(convert(n,base,p),`+`) >= p end proc: f:= proc(n) local p; convert(select(p -> g(n,p), numtheory:-factorset(n)),`*`) end proc: map(f, [$1..100]); # Robert Israel, Feb 28 2019
-
Mathematica
SD[n_, p_] := If[n < 2, 0, Plus @@ IntegerDigits[n, p]]; LP[n_] := Transpose[FactorInteger[n]][[1]]; DD1[n_] := Times @@ Select[LP[n], SD[n, #] >= # &]; Table[DD1[n], {n, 1, 100}]
-
Python
from math import prod from sympy.ntheory import digits from sympy import primefactors as pf def a(n): return prod(p for p in pf(n) if sum(digits(n, p)[1:]) >= p) print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Jul 03 2022
Comments