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.

Showing 1-10 of 24 results. Next

A286516 a(n) = b(2*n-1)/b(2*n) where b(n) = A195441(n-1) = denominator(Bernoulli_{n}(x) - Bernoulli_{n}).

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 1, 13, 7, 15, 2, 17, 3, 19, 5, 7, 11, 23, 1, 5, 13, 3, 7, 29, 5, 31, 2, 11, 17, 7, 1, 37, 19, 13, 5, 41, 21, 43, 11, 3, 23, 47, 1, 7, 5, 17, 13, 53, 3, 11, 7, 19, 29, 59, 1, 61, 31, 7, 2, 65, 11, 67, 17, 23, 5, 71, 1, 73, 37
Offset: 1

Views

Author

Keywords

Comments

a(n) is an integer for all n, a(n) is odd if n is not a power of 2, a(2^k)=2 for all k>=1, a(n)=1 infinitely often, and a(n)=p infinitely often for every prime p. See Cor. 2 and Cor. 3 in "The denominators of power sums of arithmetic progressions". See also "Power-sum denominators".

Crossrefs

Programs

  • Mathematica
    b[n_] := Denominator[ Together[ BernoulliB[n, x] - BernoulliB[n]]]; Table[
    b[2 n - 1]/b[2 n], {n, 1, 74}]

Formula

a(n) = A195441(2*n-2) / A195441(2*n-1).

A286762 Indices k such that A195441(k) = A195441(k+1).

Original entry on oeis.org

0, 21, 22, 45, 46, 57, 70, 94, 105, 118, 142, 147, 165, 171, 177, 187, 190, 214, 221, 222, 225, 237, 238, 261, 267, 281, 286, 291, 313, 315, 318, 334, 345, 350, 357, 358, 381, 382, 387, 403, 430, 437, 441, 448, 465, 477, 478, 501, 507, 538, 555, 558, 561, 565
Offset: 1

Views

Author

Peter Luschny, May 14 2017

Keywords

Comments

k is in this sequence if and only if the primes p less than or equal to (k+2)/(2+(k mod 2)) such that the sum of digits of k+1 in base p is at least p are also the primes less than or equal to (k+3)/(2+((k+1) mod 2)) such that the sum of digits of k+2 in base p is at least p.
For the comment above and the fact that the sequence is infinite, see Thm. 2 in "Power-Sum Denominators" and Cor. 3 in "The denominators of power sums of arithmetic progressions". - Bernd C. Kellner and Jonathan Sondow, May 24 2017

Examples

			21 and 22 are in this sequence because {2, 3, 5} is the set of primes which meet the given constraints. Let sd(n, p) denote the sum of digits of n in base p, then we have:
2 <= sd(22, 2) = 3; 3 <= sd(22, 3) = 4; 5 <= sd(22, 5) = 6;
2 <= sd(23, 2) = 4; 3 <= sd(23, 3) = 5; 5 <= sd(23, 5) = 7;
2 <= sd(24, 2) = 2; 3 <= sd(24, 3) = 4; 5 <= sd(24, 5) = 8.
All other candidates do not satisfy the requirements: sd(22,7) = 4; sd(22,11) = 2; sd(23,7) = 5; sd(24,7) = 6; sd(24,11) = 4; sd(24,13) = 12.
		

Crossrefs

Programs

  • Julia
    function A286762_list(bound::Int)
        L = fmpz[]; a = fmpz(0)
        for n in 0:bound
            u = A195441(n)
            a == u && push!(L, n-1)
            a = u
        end
    L end
    println(A286762_list(566))
  • Mathematica
    -1 + SequencePosition[Table[Denominator[Together[(BernoulliB[n + 1, x] - BernoulliB[n + 1])]], {n, 0, 600}], w_ /; And[SameQ @@ w, Length@ w == 2]][[All, 1]] (* Michael De Vlieger, Sep 22 2017, after Jonathan Sondow at A195441 *)

A286763 Numbers that appear in A195441 at least once for two consecutive indices.

Original entry on oeis.org

1, 30, 210, 330, 2310, 3990, 6090, 14790, 43890, 66990, 82110, 125970, 144210, 181830, 881790, 1009470, 1067430, 1217370, 2284590, 2381190, 17687670, 18888870, 26265030, 35068110, 39544890, 47763870, 115223790, 127652070, 406816410, 497668710, 741110370, 1024748670
Offset: 1

Views

Author

Peter Luschny, May 14 2017

Keywords

Comments

The sequence is infinite; see Cor. 3 in "The denominators of power sums of arithmetic progressions". - Bernd C. Kellner and Jonathan Sondow, May 24 2017

Examples

			A195441(21) = A195441(22) = 30, so 30 is in the sequence. - _Jonathan Sondow_, Dec 11 2018
		

Crossrefs

Programs

  • Julia
    function A286763_search()
        A = fmpz[]; a = fmpz(0)
        for n in 0:10000
            u = A195441(n)
            a == u && push!(A, a)
            a = u
        end
        S = sort([a for a in Set(A)])
    S[1:32] end
    println(A286763_search())
  • Mathematica
    Take[#, 32] &@ Union@ SequenceCases[ Table[ Denominator[ Together[ (BernoulliB[n + 1, x] - BernoulliB[n + 1])]], {n, 0, 2000}], w_ /; And[SameQ @@ w, Length@ w >= 2]][[All, 1]] (* Michael De Vlieger, Sep 22 2017, after Jonathan Sondow at A195441 *)

A341107 a(n) = A341108(n)/A195441(n).

Original entry on oeis.org

1, 1, 2, 4, 8, 8, 96, 192, 1152, 384, 1536, 1536, 18432, 18432, 73728, 147456, 884736, 884736, 10616832, 10616832, 212336640, 212336640, 2548039680, 849346560, 152882380800, 30576476160, 366917713920, 40768634880, 163074539520, 163074539520, 1956894474240
Offset: 0

Views

Author

Peter Luschny, Feb 07 2021

Keywords

Crossrefs

Programs

  • Sage
    def A341107(n):
        def L(n, p, r):
            s, q = 0, p - r
            while q <= n:
                s += n // q
                q *= p
            return s
        if n < 2: return 1
        p = prod(p^(L(n, p, 1) - L(n+1, p, 0)) for p in primes(n+1))
        q = prod(p for p in prime_divisors(n + 1))
        r = prod(p for p in (2..(n + 2)//(2 + n % 2))
                  if is_prime(p) and sum((n+1).digits(base = p)) >= p)
        return ((n + 1) * p) // (q * r)
    print([A341107(n) for n in (0..30)])

A144845 Least number k such that all coefficients of k*B(n,x), the n-th Bernoulli polynomial, are integers.

Original entry on oeis.org

1, 2, 6, 2, 30, 6, 42, 6, 30, 10, 66, 6, 2730, 210, 30, 6, 510, 30, 3990, 210, 2310, 330, 690, 30, 2730, 546, 42, 14, 870, 30, 14322, 462, 39270, 3570, 210, 6, 1919190, 51870, 2730, 210, 94710, 2310, 99330, 2310, 4830, 4830, 9870, 210, 46410, 6630, 14586, 858
Offset: 0

Views

Author

T. D. Noe, Sep 22 2008

Keywords

Comments

The lcm of the terms in row n of A053383. It appears that the Bernoulli polynomial B(n,x) is irreducible for all even n.
This sequence appears in a paper of Bazsó & Mező, who use this sequence to give necessary and sufficient conditions for power sums to be integer polynomials. - Istvan Mezo, Mar 20 2016
In "The denominators of power sums of arithmetic progressions" Corollary 1, we give a simple way to compute a(n) without using Bernoulli polynomials. Namely, a(n) equals (product of the primes dividing n+1) times (product of the primes p <= (n+1)/(2+(n+1 mod 2)) not dividing n+1 such that the sum of the base-p digits of n+1 is at least p). - Bernd C. Kellner and Jonathan Sondow, May 15 2017

Crossrefs

Programs

  • Maple
    seq(denom(bernoulli(i,x)),i=0..51); # Peter Luschny, Jun 16 2012
  • Mathematica
    (* From Bernd C. Kellner, Oct 18 2023: (Start) *)
    (* Denominator formula *)
    Table[Denominator[Together[BernoulliB[n, x]]], {n, 0, 51}]
    (* Product formula *)
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus@@IntegerDigits[n, p]]; rad[n_] := Times @@ Select[Divisors[n], PrimeQ]; (* A324370 *) DD2[n_] := Times @@ Select[Prime[Range[PrimePi[(n+1)/(2+Mod[n+1, 2])]]], !Divisible[n, #] && SD[n, #] >= # &];
    DB[n_] := DD2[n+1] rad[n+1]; Table[DB[n], {n, 0, 51}]
    (* (End) *)
  • PARI
    a(n) = lcm(apply(x->denominator(x), Vec(bernpol(n)))); \\ Michel Marcus, Mar 03 2020
  • Sage
    def A144845(n):
        return mul(prime_divisors(n+1) + [p for p in (2..(n+2)//(2+n%2))
        if is_prime(p) and not p.divides(n+1) and sum((n+1).digits(base=p)) >= p])
    print([A144845(n) for n in (0..51)]) # Peter Luschny, Sep 12 2018
    

Formula

From Bernd C. Kellner, Oct 18 2023: (Start)
Let rad(n) = A007947(n) be the radical of n. Let (n)_m be the falling factorial. Let f^(m)(x) denote the m-th derivative of f(x).
a(n) = lcm(A195441(n-1), A027642(n)) = lcm(denom(B(n,x)-B_n), denom(B_n)) = denom(B(n,x)).
a(n) = lcm(A195441(n), rad(n+1)).
a(n) = lcm(a(n+1), rad(n+1)), if n >= 2 is even.
a(2n)/a(2n+1) = A286517(n), if n >= 1.
a(n) = A324369(n+1) * A324370(n+1) * A324371(n+1).
a(n) = A324370(n+1) * rad(n+1).
a(n) = rad(A064538(n)).
If n >= m >= 1, then denom(B^(m)(n,x)) = a(n-m)/gcd(a(n-m), (n)A324370(n-m+1)/gcd(A324370(n-m+1),%20(n)">m) = A324370(n-m+1)/gcd(A324370(n-m+1), (n){m-1}).
(See papers of Kellner and Kellner & Sondow.) (End)

A324370 Product of all primes p not dividing n such that the sum of the base-p digits of n is at least p, or 1 if no such prime exists.

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 6, 3, 10, 1, 6, 1, 210, 15, 2, 3, 30, 5, 210, 21, 110, 15, 30, 5, 546, 21, 14, 1, 30, 1, 462, 231, 1190, 105, 6, 1, 51870, 1365, 70, 21, 2310, 55, 2310, 105, 322, 105, 210, 35, 6630, 663, 286, 33, 330, 55, 798, 57, 290, 15, 30, 1, 930930, 15015, 1430, 2145, 1122, 85, 82110, 2415, 70, 3, 330, 55, 21111090, 285285
Offset: 1

Views

Author

Keywords

Comments

The product is finite, as the sum of the base-p digits of n is n if p > n.
a(198) = 2465 is the only term below 10^6 that is a Carmichael number (A002997).
It appears that a(n)=1 if and only if n is in A094960. - Robert Israel, Mar 30 2020
It turns out that a(n) equals the denominator of the first derivative of the Bernoulli polynomial B(n,x). So a(n)=1 if and only if n is in A094960, also impyling that n+1 is prime. A324370 is also involved in such formulas regarding higher derivatives. See Kellner 2023. - Bernd C. Kellner, Oct 12 2023

Examples

			For p = 2, 3, and 5, the sum of the base p digits of 7 is 1+1+1 = 3 >= 2, 2+1 = 3 >= 3, and 1+2 = 3 < 5, respectively, so a(7) = 2*3 = 6.
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    V:= Vector(N,1):
    p:= 1:
    for iter from 1 do
       p:= nextprime(p);
       if p >= N then break fi;
       for n from p+1 to N do
         if n mod p <> 0 and convert(convert(n,base,p),`+`)>= p then
           V[n]:= V[n]*p
         fi
    od od:
    convert(V,list); # Robert Israel, Mar 30 2020
    # Alternatively, note that this formula is suggesting offset 0 and a(0) = 1:
    seq(denom(diff(bernoulli(n, x), x)), n = 1..51); # Peter Luschny, Oct 13 2023
  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    DD2[n_] := Times @@ Select[Prime[Range[PrimePi[(n+1)/(2+Mod[n+1, 2])]]], !Divisible[n, #] && SD[n, #] >= # &];
    Table[DD2[n], {n, 1, 100}]
    (* From Bernd C. Kellner, Oct 12 2023 (Start) *)
    (* Denominator of first derivative of BP *)
    k = 1; Table[Denominator[Together[D[BernoulliB[n, x], {x, k}]]], {n, 1, 100}]
    (* End *)
  • Python
    from math import prod
    from sympy.ntheory import digits
    from sympy import primefactors, primerange
    def a(n):
        nonpf = set(primerange(1, n+1)) - set(primefactors(n))
        return prod(p for p in nonpf if sum(digits(n, p)[1:]) >= p)
    print([a(n) for n in range(1, 75)]) # Michael S. Branicky, Jul 03 2022

Formula

a(n) * A324369(n) = A195441(n-1) = denominator(Bernoulli_n(x) - Bernoulli_n).
a(n) * A324369(n) * A324371(n) = A144845(n-1) = denominator(Bernoulli_{n-1}(x)).
a(n+1) = A195441(n)/A324369(n+1) = A144845(n)/A007947(n+1) = A318256(n). Essentially the same as A318256. - Peter Luschny, Mar 05 2019
From Bernd C. Kellner, Oct 12 2023: (Start)
a(n) = denominator(Bernoulli_n(x)').
k-th derivative: let (n)_m be the falling factorial.
For n > k, a(n-k+1)/gcd(a(n-k+1), (n)_{k-1}) = denominator(Bernoulli_n(x)^(k)). Otherwise, the denominator equals 1. (End)

A324316 Primary Carmichael numbers.

Original entry on oeis.org

1729, 2821, 29341, 46657, 252601, 294409, 399001, 488881, 512461, 1152271, 1193221, 1857241, 3828001, 4335241, 5968873, 6189121, 6733693, 6868261, 7519441, 10024561, 10267951, 10606681, 14469841, 14676481, 15247621, 15829633, 17098369, 17236801, 17316001, 19384289, 23382529, 29111881, 31405501, 34657141, 35703361, 37964809
Offset: 1

Views

Author

Keywords

Comments

Squarefree integers m > 1 such that if prime p divides m, then the sum of the base-p digits of m equals p. It follows that m is then a Carmichael number (A002997).
Dickson's conjecture implies that the sequence is infinite, see Kellner 2019.
If m is a term and p is a prime factor of m, then p <= a*sqrt(m) with a = sqrt(66337/132673) = 0.7071..., where the bound is sharp.
The distribution of primary Carmichael numbers is A324317.
See Kellner and Sondow 2019 and Kellner 2019.
Primary Carmichael numbers are special polygonal numbers A324973. The rank of the n-th primary Carmichael number is A324976(n). See Kellner and Sondow 2019. - Jonathan Sondow, Mar 26 2019
The first term is the Hardy-Ramanujan number. - Omar E. Pol, Jan 09 2020

Examples

			1729 = 7 * 13 * 19 is squarefree, and 1729 in base 7 is 5020_7 = 5 * 7^3 + 0 * 7^2 + 2 * 7 + 0 with 5+0+2+0 = 7, and 1729 in base 13 is a30_13 with a+3+0 = 10+3+0 = 13, and 1729 in base 19 is 4f0_19 with 4+f+0 = 4+15+0 = 19, so 1729 is a member.
		

Crossrefs

Subsequence of A002997, A324315.
Least primary Carmichael number with n prime factors is A306657.

Programs

  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    TestCP[n_] := (n > 1) && SquareFreeQ[n] && VectorQ[LP[n], SD[n, #] == # &];
    Select[Range[1, 10^7, 2], TestCP[#] &]
  • Perl
    use ntheory ":all"; my $m; forsquarefree { $m=$; say if @ > 2 && is_carmichael($m) && vecall { $ == vecsum(todigits($m,$)) } @; } 1e7; # _Dana Jacobsen, Mar 28 2019
    
  • Python
    from sympy import factorint
    from sympy.ntheory import digits
    def ok(n):
        pf = factorint(n)
        if n < 2 or max(pf.values()) > 1: return False
        return all(sum(digits(n, p)[1:]) == p for p in pf)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jul 03 2022

Formula

a_1 + a_2 + ... + a_k = p if p is prime and m = a_1 * p + a_2 * p^2 + ... + a_k * p^k with 0 <= a_i <= p-1 for i = 1, 2, ..., k (note that a_0 = 0).

A064538 a(n) is the smallest positive integer such that a(n)*(1^n + 2^n + ... + x^n) is a polynomial in x with integer coefficients.

Original entry on oeis.org

1, 2, 6, 4, 30, 12, 42, 24, 90, 20, 66, 24, 2730, 420, 90, 48, 510, 180, 3990, 840, 6930, 660, 690, 720, 13650, 1092, 378, 56, 870, 60, 14322, 7392, 117810, 7140, 210, 72, 1919190, 103740, 8190, 1680, 94710, 13860, 99330, 9240, 217350, 9660, 9870, 10080, 324870
Offset: 0

Views

Author

Floor van Lamoen, Oct 08 2001

Keywords

Comments

a(n) is a multiple of n+1. - Vladimir Shevelev, Dec 20 2011
Let P_n(x) = 1^n + 2^n + ... + x^n = Sum_{i=1..n+1}c_i*x^i. Let P^*n(x) = Sum{i=1..n+1}(c_i/(i+1))*(x^(i+1)-x). Then b(n) = (n+1)*a(n+1)is the smallest positive integer such that b(n)*P^*n(x) is a polynomial with integer coefficients. Proof follows from the recursion P(n+1)(x) = x + (n+1)*P^*n(x). As a corollary, note that, if p is the maximal prime divisor of a(n), then p<=n+1. - _Vladimir Shevelev, Dec 21 2011
The recursion P_(n+1)(x) = x + (n+1)*P^*n(x) is due to Abramovich (1973); see also Shevelev (2007). - _Jonathan Sondow, Nov 16 2015
The sum S_m(n) = Sum_{k=0..n} k^m can be written as S_m(n) = n(n+1)(2n+1)P_m(n)/a(m) for even m>1, or S_m(n) = n^2*(n+1)^2*P_m(n)/a(m) for odd m>1, where a(m) is the LCM of the denominators of the coefficients of the polynomial P_m/a(m), i.e., the smallest integer such that P_m defined in this way has integer coefficients. (Cf. Michon link.) - M. F. Hasler, Mar 10 2013
a(n)/(n+1) is squarefree, by Faulhaber's formula and the von Staudt-Clausen theorem on the denominators of Bernoulli numbers. - Kieren MacMillan and Jonathan Sondow, Nov 20 2015
a(n) equals n+1 times the product of the primes p <= (n+2)/(2+(n mod 2)) such that the sum of the base-p digits of n+1 is at least p. - Bernd C. Kellner and Jonathan Sondow, May 24 2017

Examples

			1^3 + 2^3 + ... + x^3 = (x(x+1))^2/4 so a(3)=4.
1^4 + 2^4 + ... + x^4 = x(x+1)(2x+1)(3x^2+3x-1)/30, therefore a(4)=30.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprints), p. 804, Eq. 23.1.4.

Crossrefs

Programs

  • Maple
    A064538 := n -> denom((bernoulli(n+1,x)-bernoulli(n+1))/(n+1)): # Peter Luschny, Aug 19 2011
    # Formula of Kellner and Sondow (2017):
    a := proc(n) local s; s := (p,n) -> add(i,i=convert(n,base,p));
    select(isprime,[$2..(n+2)/(2+irem(n,2))]);
    (n+1)*mul(i,i=select(p->s(p,n+1)>=p,%)) end: seq(a(n), n=0..48); # Peter Luschny, May 14 2017
  • Mathematica
    A064538[n_] := Denominator[ Together[ (BernoulliB[n+1, x] - BernoulliB[n+1])/(n+1)]];
    Table[A064538[n], {n, 0, 44}] (* Jean-François Alcover, Feb 21 2012, after Maple *)
  • PARI
    a(n) = {my(vp = Vec(bernpol(n+1, x)-bernfrac(n+1))/(n+1)); lcm(vector(#vp, k, denominator(vp[k])));} \\ Michel Marcus, Feb 07 2016
    
  • Python
    from _future_ import division
    from sympy.ntheory.factor_ import digits, nextprime
    def A064538(n):
        p, m = 2, n+1
        while p <= (n+2)//(2+ (n% 2)):
            if sum(d for d in digits(n+1,p)[1:]) >= p:
                m *= p
            p = nextprime(p)
        return m # Chai Wah Wu, Mar 07 2018
  • Sage
    A064538 = lambda n: (n+1)*mul([p for p in (2..(n+2)//(2+n%2)) if is_prime(p) and sum((n+1).digits(base=p)) >= p])
    print([A064538(n) for n in (0..48)]) # Peter Luschny, May 14 2017
    

Formula

a(n) = (n+1)*A195441(n). - Jonathan Sondow, Nov 12 2015
A001221(a(n)/(n+1)) = A001222(a(n)/(n+1)). - Kieren MacMillan and Jonathan Sondow, Nov 20 2015
rad(a(n)) = A007947(a(n)) = A144845(n) = A324369(n+1) * A324370(n+1) * A324371(n+1). - Bernd C. Kellner, Oct 12 2023

A324315 Squarefree integers m > 1 such that if prime p divides m, then the sum of the base p digits of m is at least p.

Original entry on oeis.org

231, 561, 1001, 1045, 1105, 1122, 1155, 1729, 2002, 2093, 2145, 2465, 2821, 3003, 3315, 3458, 3553, 3570, 3655, 3927, 4186, 4199, 4522, 4774, 4845, 4862, 5005, 5187, 5565, 5642, 5681, 6006, 6118, 6270, 6279, 6545, 6601, 6670, 6734, 7337, 7395, 7735, 8177, 8211, 8265, 8294, 8323, 8463, 8645, 8789, 8855, 8911, 9282, 9361, 9435, 9690, 9867
Offset: 1

Views

Author

Keywords

Comments

The sequence is infinite, because it contains all Carmichael numbers (A002997).
If m is a term and p is a prime factor of m, then p <= a*sqrt(m) with a = sqrt(11/21) = 0.7237..., where the bound is sharp.
A term m must have at least 3 prime factors if m is odd, and must have at least 4 prime factors if m is even.
m is a term if and only if m > 1 divides denominator(Bernoulli_m(x) - Bernoulli_m) = A195441(m-1).
A term m is a Carmichael number iff s_p(m) == 1 (mod p-1) whenever prime p divides m, where s_p(m) is the sum of the base p digits of m.
See Kellner and Sondow 2019.

Examples

			231 = 3 * 7 * 11 is squarefree, and 231 in base 3 is 22120_3 = 2 * 3^4 + 2 * 3^3 + 1 * 3^2 + 2 * 3 + 0 with 2+2+1+2+0 = 7 >= 3, and 231 = 450_7 with 4+5+0 = 9 >= 7, and 231 = 1a0_11 with 1+a+0 = 1+10+0 = 11 >= 11, so 231 is a member.
		

Crossrefs

Programs

  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    TestS[n_] := (n > 1) && SquareFreeQ[n] && VectorQ[LP[n], SD[n, #] >= # &];
    Select[Range[10^4], TestS[#] &]
  • Python
    from sympy import factorint
    from sympy.ntheory import digits
    def ok(n):
        pf = factorint(n)
        if n < 2 or max(pf.values()) > 1: return False
        return all(sum(digits(n, p)[1:]) >= p for p in pf)
    print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Jul 03 2022

Formula

a_1 + a_2 + ... + a_k >= p for m = a_1 * p + a_2 * p^2 + ... + a_k * p^k with 0 <= a_i <= p-1 for i = 1, 2, ..., k (note that a_0 = 0).

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.

Original entry on oeis.org

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

Views

Author

Keywords

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.

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.
		

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

Formula

a(n) * A324371(n) = A007947(n) = radical(n).
a(n) * A324370(n) = A195441(n-1) = denominator(Bernoulli_n(x) - Bernoulli_n).
a(n) * A324370(n) * A324371(n) = A144845(n-1) = denominator(Bernoulli_{n-1}(x)).
Showing 1-10 of 24 results. Next