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.

Previous Showing 11-20 of 27 results. Next

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)).

A324371 Product of all primes p dividing n such that the sum of the base p digits of n is less than p, or 1 if no such prime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Does not contain any elements of A324315, and thus none of the Carmichael numbers A002997.
See the section on Bernoulli polynomials in Kellner and Sondow 2019.

Examples

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

Crossrefs

Programs

  • Maple
    f:= n -> convert(select(p -> convert(convert(n,base,p),`+`)Robert Israel, Apr 26 2020
  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    DD3[n_] := Times @@ Select[LP[n], SD[n, #] < # &];
    Table[DD3[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, 85)]) # Michael S. Branicky, Jul 03 2022

Formula

a(n) * A324369(n) = A007947(n) = radical(n).
a(n) * A195441(n) = a(n) * A324369(n) * A324370(n) = A144845(n-1) = denominator(Bernoulli_{n-1}(x)).

A094960 Positive integers k such that the derivative of the k-th Bernoulli polynomial B(k,x) contains only integer coefficients.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 28, 30, 36, 60
Offset: 1

Views

Author

Benoit Cloitre, Jun 19 2004

Keywords

Comments

From Max Alekseyev, Dec 08 2011: (Start)
There are no other terms below 10^9.
k belongs to this sequence if k*binomial(k-1,m)*Bernoulli(m) is an integer for each m in 0..k-1. (End)
From Max Alekseyev, Jun 04 2012: (Start)
If for a prime p >= 3, k ends with base-p digits a,b with a+b >= p, then for m = (a+1)*(p-1), the number k*binomial(k-1,m)*Bernoulli(m) is not an integer (it contains p in the denominator). For p=3, this implies that k == 5, 7, or 8 (mod 9) are not in this sequence; for p=5, this implies that k == 9, 13, 14, 17, 18, 19, 21, 22, 23, or 24 (mod 25) are not in this sequence; and so on.
Conjecture: for every integer k > 78, there exists a prime p >= 3 such that the sum of last two base-p digits of k is at least p. This conjecture would imply that this sequence is finite and 60 is the last term. (End)
The conjecture is true for all k such that k+1 is not a prime, a power of 2, or a Giuga number (A007850). In this case, there exists a prime p >= 3 such that the base-p representation of k ends in a,p-1 with a > 0. - Max Alekseyev, Feb 16 2021
The sequence is finite and is a subsequence of A366169. The terms are those numbers k where A324370(k) = 1. It remains to show that 60 is the last term. This is very likely, since the terms depend on the estimation of a product of primes satisfying certain p-adic conditions that is connected with A324370. A proven asymptotic formula related to that product implies that this sequence is finite. See Kellner 2017, 2023, and BLMS 2018. - Bernd C. Kellner, Oct 02 2023

Examples

			B(6,x) = x^6 - 3*x^5 + (5/2)*x^4 - (1/2)*x^2 + 1/42 so B'(6,x) contains only integer coefficients and 6 is in the sequence.
		

Crossrefs

Programs

  • Maple
    p := n -> if denom(diff(bernoulli(n, x), x)) = 1 then n else fi:
    seq(p(n), n=1..100); # Emeric Deutsch
  • Mathematica
    (* From Bernd C. Kellner, Oct 02 2023. (Start) *)
    (* k-th derivative of BP: *)
    k = 1; Select[Range[1000], Denominator[Together[D[BernoulliB[#, x],{x, k}]]] == 1&]
    (* Exact denominator formula: *)
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus@@IntegerDigits[n, p]];
    DBP[n_, k_] := Module[{m = n-k+1, fac = FactorialPower[n, k]}, If[n < 1 || k < 1 || n <= k, Return[1]]; Times@@Select[Prime[Range[PrimePi[(m+1)/(2 + Mod[m+1, 2])]]], !Divisible[fac, #] && SD[m, #] >= #&]];
    k = 1; Select[Range[1000], DBP[#, k] == 1&]
    (* End *)
  • PARI
    is_A094960(k) = !#select(x->(denominator(x)!=1), Vec(deriv(bernpol(k)))); \\ Michel Marcus, Feb 15 2021
    
  • Python
    from itertools import count, islice
    from sympy import Poly, diff, bernoulli
    from sympy.abc import x
    def A094960_gen(): # generator of terms
        return filter(lambda k:k<=1 or all(c.is_integer for c in Poly(diff(bernoulli(k,x),x)).coeffs()),count(1))
    A094960_list = list(islice(A094960_gen(),10)) # Chai Wah Wu, Oct 03 2023

Formula

k is a term if A324370(k) = 1. - Bernd C. Kellner, Oct 02 2023
k is a term <=> 0 = Sum_{j=0..k-1} k*binomial(k - 1, j) mod Clausen(j), where Clausen(n) = A160014(n, 1). - Peter Luschny, Oct 04 2023

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).

A366168 Denominator of the second derivative of the n-th Bernoulli polynomial B(n,x).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 3, 5, 5, 21, 1, 5, 15, 5, 1, 21, 7, 1, 1, 1, 1, 231, 7, 35, 3, 1, 1, 1365, 35, 7, 21, 55, 55, 105, 7, 7, 105, 35, 5, 663, 13, 11, 33, 55, 1, 57, 1, 5, 15, 1, 1, 15015, 715, 715, 33, 17, 85, 2415, 35, 1, 3, 55, 55, 285285, 19019, 1001
Offset: 1

Views

Author

Bernd C. Kellner, Oct 02 2023

Keywords

Comments

The sequence consists only of odd numbers. The denominators are connected with A324370, from which an explicit formula follows as given below. See Kellner 2023.

Examples

			B(5,x) = x^5 - (5x^4)/2 + (5 x^3)/3 - x/6 and B''(5,x) = 20x^3 - 30x^2 + 10x, so a(5) = 1.
a(14) = A324370(13)/gcd(A324370(13), 14) = 210/gcd(210, 14) = 15.
		

Crossrefs

Programs

  • Mathematica
    (* k-th derivative of BP *)
    k = 2; Table[Denominator[Together[D[BernoulliB[n, x], {x, k}]]], {n, 1, 100}]
    (* exact denominator formula *)
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus@@IntegerDigits[n, p]];
    DBP[n_, k_] := Module[{m = n-k+1, fac = FactorialPower[n, k]}, If[n < 1 || k < 1 || n <= k, Return[1]]; Times@@Select[Prime[Range[PrimePi[(m+1)/(2 + Mod[m+1, 2])]]], !Divisible[fac, #] && SD[m, #] >= #&]];
    k = 2; Table[DBP[n, k], {n, 1, 100}]
  • Python
    from math import lcm
    from sympy import Poly, diff, bernoulli
    from sympy.abc import x
    def A366168(n): return lcm(*(c.q for c in Poly(diff(bernoulli(n,x),x,2)).coeffs())) if n>=3 else 1 # Chai Wah Wu, Oct 04 2023

Formula

Let (n)_k be the falling factorial. Let s_p(n) be the sum of the p-adic digits of n.
a(1) = 1, and for n > 1, a(n) = A324370(n-1)/gcd(A324370(n-1), n) = Product_{prime p <= n/(2+(n mod 2)): gcd(p,(n)_2)=1, s_p(n-1) >= p} p.

A285068 Denominators of the generalized Bernoulli numbers B[3,1] = 3^n*B(n, 1/3).

Original entry on oeis.org

1, 2, 2, 1, 10, 1, 14, 1, 10, 1, 22, 1, 910, 1, 2, 1, 170, 1, 266, 1, 110, 1, 46, 1, 910, 1, 2, 1, 290, 1, 4774, 1, 170, 1, 2, 1, 639730, 1, 2, 1, 4510, 1, 602, 1, 230, 1, 94, 1, 15470, 1, 22
Offset: 0

Views

Author

Wolfdieter Lang, Apr 28 2017

Keywords

Comments

The numerators are given in A157799.
Because B(n, 2/3) = (-1)^n*B(n, 1/3) (from the e.g.f. z*exp(x*z)/(exp(z)-1) of Bernoulli polynomials {B(n, x)}_{n>=0}) one has for the numbers B[3,2](n) = 3^n*B(n, 2/3) the numerators (-1)^n*A157799(n) and the denominators a(n).
This sequence gives also the denominators of {3^n*B(n)}_{n>=0} with numerators given in A285863.

Examples

			The Bernoulli numbers r(n) = B[3,1](n) begin: 1, -1/2, -1/2, 1, 13/10, -5, -121/14, 49, 1093/10, -809, -49205/22, 20317, 61203943/910, -722813, -5580127/2, 34607305, ...
The Bernoulli numbers B[3,2](n) begin: 1, 1/2, -1/2, -1, 13/10, 5, -121/14, -49, 1093/10, 809, -49205/22, -20317, 61203943/910, 722813, -5580127/2, -34607305, ...
From _Peter Luschny_, Mar 26 2021: (Start)
The generalized Bernoulli numbers as given in the Luschny link are different.
1, -7/2, 23/2, -35, 973/10, -245, 7943/14, -1295, 31813/10, -7721, 288715/22, -13475, 128296423/910, -882557, -4891999/2, 33870025, ...
The numerators of these numbers are in A157811. (End)
		

Crossrefs

Programs

  • Mathematica
    Table[Denominator[3^n*BernoulliB[n, 1/3]], {n, 0, 100}] (* Indranil Ghosh, Jul 18 2017 *)
  • PARI
    a(n) = denominator(3^n * bernfrac(n)); \\ Ruud H.G. van Tol, Jan 31 2024
  • Python
    from sympy import bernoulli, Rational
    def a(n):
        return (3**n * bernoulli(n, Rational(1,3))).as_numer_denom()[1]
    print([a(n) for n in range(101)])  # Indranil Ghosh, Jul 18 2017
    
  • SageMath
    # uses [gen_bernoulli_number from A157811]
    print([denominator((-1)^n*gen_bernoulli_number(n, 3)) for n in range(23)])
    # Peter Luschny, Mar 26 2021
    

Formula

a(n) = denominator(r(n)) with the rationals (in lowest terms) r(n) = Sum_{k=0..n} ((-1)^k / (k+1))*A282629(n, k)*k! = Sum_{k=0..n} ((-1)^k/(k+1))*A284861(n, k). r(n) = B[3,1](n) = 3^n*B(n, 1/3) with the Bernoulli polynomials A196838/A196839 or A053382/A053383.
a(n) = A157800(n)/3^n, n >= 0.

A366169 Positive integers k such that the second derivative of the k-th Bernoulli polynomial B(k,x) contains only integer coefficients.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 15, 16, 21, 25, 28, 29, 30, 31, 36, 37, 55, 57, 60, 61, 70, 121, 190
Offset: 1

Views

Author

Bernd C. Kellner, Oct 02 2023

Keywords

Comments

The sequence is finite and is a supersequence of A094960. The terms are those numbers k where the denominator A366168(k) = 1. It remains to show that 190 is the last term. This is very likely, since the terms depend on the estimation of a product of primes satisfying certain p-adic conditions that is connected with A324370. A proven asymptotic formula related to that product implies that this sequence is finite. See Kellner 2017, 2023, and BLMS 2018.

Examples

			B(5,x) = x^5 - (5x^4)/2 + (5 x^3)/3 - x/6 and B''(5,x) = 20x^3 - 30x^2 + 10x, so 5 is a term.
		

Crossrefs

Programs

  • Maple
    aList := len -> select(n -> denom(diff(diff(bernoulli(n, x), x), x)) = 1, [seq(1..len)]): aList(200);  # Peter Luschny, Oct 03 2023
  • Mathematica
    (* k-th derivative of BP *)
    k = 2; Select[Range[1000], Denominator[Together[D[BernoulliB[#, x],{x, k}]]] == 1&]
    (* exact denominator formula *)
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus@@IntegerDigits[n, p]];
    DBP[n_, k_] := Module[{m = n-k+1, fac = FactorialPower[n, k]}, If[n < 1 || k < 1 || n <= k, Return[1]]; Times@@Select[Prime[Range[PrimePi[(m+1)/(2 + Mod[m+1, 2])]]], !Divisible[fac, #] && SD[m, #] >= #&]];
    k = 2; Select[Range[1000], DBP[#, k] == 1&]
  • PARI
    isok(k) = #select(x->denominator(x)>1, Vec(deriv(deriv(bernpol(k))))) == 0; \\ Michel Marcus, Oct 03 2023
    
  • Python
    from itertools import count, islice
    from sympy import Poly, diff, bernoulli
    from sympy.abc import x
    def A366169_gen(): # generator of terms
        return filter(lambda k:k<=2 or all(c.is_integer for c in Poly(diff(bernoulli(k,x),x,2)).coeffs()),count(1))
    A366169_list = list(islice(A366169_gen(),20)) # Chai Wah Wu, Oct 03 2023

Formula

k is a term if A366168(k) = 1.

A318256 a(n) = (denominator of B(n,x)) / (the squarefree kernel of n+1), where B(n,x) is the n-th Bernoulli polynomial.

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
Offset: 0

Views

Author

Peter Luschny, Sep 12 2018

Keywords

Examples

			a(59) = 1 because there exist no number which satisfies the definition (and the product of an empty set is 1).
a(60) = 930930 because {2, 3, 5, 7, 11, 13, 31} are the only primes which satisfy the definition.
The denominator of the Bernoulli polynomial B_n(x) equals the squarefree kernel of n+1 if n is in {0, 1, 3, 5, 9, 11, 27, 29, 35, 59}. These might be the only numbers with this property.
		

Crossrefs

a(n) = A144845(n) / A007947(n+1).
Cf. A324370 (same sequence with offset 1).

Programs

  • Maple
    a := n -> denom(bernoulli(n, x)) / mul(p, p in numtheory:-factorset(n+1)):
    seq(a(n), n=0..61);
  • Mathematica
    sfk[n_] := Times @@ FactorInteger[n][[All, 1]];
    a[n_] := (BernoulliB[n, x] // Together // Denominator)/sfk[n+1];
    Table[a[n], {n, 0, 61}] (* Jean-François Alcover, Feb 14 2019 *)
  • Sage
    def A318256(n): return mul([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([A318256(n) for n in (0..61)])

Formula

Let Q(n) = {p <= floor((n + 2)/(2 + n mod 2)) and p is prime and p does not divide n + 1 and the sum of the digits in base p of n+1 is at least p} then a(n) = Product_{p in Q(n)} p. (See the Kellner & Sondow links.)
a(n) = denominator(Bernoulli'(n+1, x)), where ' denotes d/dx. - Peter Luschny, Oct 15 2023

A286515 a(n) = denominator(Bernoulli_{n}(x)) / denominator(Bernoulli_{n}).

Original entry on oeis.org

1, 1, 1, 2, 1, 6, 1, 6, 1, 10, 1, 6, 1, 210, 5, 6, 1, 30, 5, 210, 7, 330, 5, 30, 1, 546, 7, 14, 1, 30, 1, 462, 77, 3570, 35, 6, 1, 51870, 455, 210, 7, 2310, 55, 2310, 7, 4830, 35, 210, 1, 6630, 221, 858, 11, 330, 55, 798, 19, 870, 5, 30, 1, 930930, 5005, 4290
Offset: 0

Views

Author

Keywords

Comments

a(n) is a squarefree integer for all n, a(n) is odd if n>=0 is even, and a(n) is even if n>=3 is odd. See "Power-sum denominators", Thm. 4, pp. 12-13, and "The denominators of power sums of arithmetic progressions", Thm. 3, pp. 3 and 11-12.

Crossrefs

Programs

  • Maple
    seq(denom(bernoulli(n,x))/denom(bernoulli(n)), n=0..100); # Robert Israel, May 24 2017
  • Mathematica
    Table[ Denominator[ Together[ BernoulliB[n, x]]]/Denominator[ BernoulliB[n]], {n, 0, 63}]
  • PARI
    apply( a(n)=denominator(content(bernpol(n)))/denominator(bernfrac(n)), [1..50]) \\ M. F. Hasler, Dec 10 2018

Formula

a(n) = A144845(n)/A027642(n) = A195441(n-1)/gcd(A195441(n-1),A027642(n)).

A286517 a(n) = b(2*n)/b(2*n+1) where b(n) = denominator(Bernoulli_{n}(x)).

Original entry on oeis.org

3, 5, 7, 3, 11, 13, 5, 17, 19, 7, 23, 5, 3, 29, 31, 11, 35, 37, 13, 41, 43, 1, 47, 7, 17, 53, 55, 19, 59, 61, 7, 13, 67, 23, 71, 73, 5, 77, 79, 3, 83, 17, 29, 89, 13, 31, 19, 97, 11, 101, 103, 7, 107, 109, 37, 113, 23, 13, 119, 11, 41, 5, 127, 43, 131, 19, 5
Offset: 1

Views

Author

Keywords

Comments

a(n) is an odd integer for all n, a(n)=1 infinitely often, and a(n)=p infinitely often for every odd 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]]]; Table[ b[2 n]/b[2 n + 1], {n, 1, 67}]

Formula

a(n) = A144845(2*n) / A144845(2*n+1) for n >= 1.
Previous Showing 11-20 of 27 results. Next