|
|
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.
|
|
15
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
a(n) = n iff n divides denominator(Bernoulli_n(x) - Bernoulli_n) (see A195441).
a(n) = n iff n = 1 or n is in A324315.
a(n) = n if n is a Carmichael number (A002997).
See the section on Bernoulli polynomials in Kellner and Sondow 2019.
|
|
LINKS
|
|
|
FORMULA
|
a(n) * A324370(n) = A195441(n-1) = denominator(Bernoulli_n(x) - Bernoulli_n).
|
|
EXAMPLE
|
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.
|
|
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:
|
|
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}]
|
|
PROG
|
(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)
|
|
CROSSREFS
|
Cf. A007947, A144845, A195441, A324315, A324316, A324317, A324318, A324319, A324320, A324370, A324371, A324404, A324405.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|