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 38 results. Next

A141459 a(n) = Product_{p-1 divides n} p, where p is an odd prime.

Original entry on oeis.org

1, 1, 3, 1, 15, 1, 21, 1, 15, 1, 33, 1, 1365, 1, 3, 1, 255, 1, 399, 1, 165, 1, 69, 1, 1365, 1, 3, 1, 435, 1, 7161, 1, 255, 1, 3, 1, 959595, 1, 3, 1, 6765, 1, 903, 1, 345, 1, 141, 1, 23205, 1, 33, 1, 795, 1, 399, 1, 435, 1, 177, 1, 28393365, 1, 3, 1, 255, 1, 32361, 1, 15, 1, 2343, 1, 70050435
Offset: 0

Views

Author

Paul Curtz, Aug 08 2008

Keywords

Comments

Previous name was: A027760(n)/2 for n>=1, a(0) = 1.
Conjecture: a(n) = denominator of integral_{0..1}(log(1-1/x)^n) dx. - Jean-François Alcover, Feb 01 2013
Define the generalized Bernoulli function as B(s,z) = -s*z^s*HurwitzZeta(1-s,1/z) for Re(1/z) > 0 and B(0,z) = 1 for all z; further the generalized Bernoulli polynomials as Bp(m,n,z) = Sum_{j=0..n} B(j,m)*C(n,j)*(z-1)^(n-j) then the a(n) are denominators of Bp(2,n,1), i. e. of the generalized Bernoulli numbers in the case m=2. The numerators of these numbers are A157779(n). - Peter Luschny, May 17 2015
From Peter Luschny, Nov 22 2015: (Start)
a(n) are the denominators of the centralized Bernoulli polynomials 2^n*Bernoulli(n, x/2+1/2) evaluated at x=1. The numerators are A239275(n).
a(n) is the odd part of A141056(n).
a(n) is squarefree, by the von Staudt-Clausen theorem. (End)
Apparently a(n) = denominator(Sum_{k=0..n-1}(-1)^k*E2(n-1, k+1)/binomial(2*n-1, k+1)) where E2(n, k) denotes the second-order Eulerian numbers A340556. - Peter Luschny, Feb 17 2021

Examples

			The denominators of 1, 0, -1/3, 0, 7/15, 0, -31/21, 0, 127/15, 0, -2555/33, 0, 1414477/1365, ...
		

Crossrefs

Programs

  • Maple
    Bfun := (s,z) -> `if`(s=0,1,-s*z^s*Zeta(0,1-s,1/z): # generalized Bernoulli function
    Bpoly := (m,n,z) -> add(Bfun(j,m)*binomial(n,j)*(z-1)^(n-j),j=0..n): # generalized Bernoulli polynomials
    seq(Bpoly(2,n,1),n=0..50): denom([%]);
    # which simplifies to:
    a := n -> 0^n+add(Zeta(1-j)*(2^j-2)*j*binomial(n,j), j=1..n):
    seq(denom(a(n)), n=0..50); # Peter Luschny, May 17 2015
    # Alternatively:
    with(numtheory):
    ClausenOdd := proc(n) local S, m;
    S := map(i -> i + 1, divisors(n));
    S := select(isprime, S) minus {2};
    mul(m, m = S) end: seq(ClausenOdd(n), n=0..72); # Peter Luschny, Nov 22 2015
    # Alternatively:
    N:= 1000: # to get a(0) to a(N)
    V:= Array(0..N, 1):
    for p in select(isprime, [seq(i,i=3..N+1,2)]) do
      R:=[seq(j,j=p-1..N, p-1)]:
      V[R]:= V[R] * p;
    od:
    convert(V,list); # Robert Israel, Nov 22 2015
  • Mathematica
    a[n_] := If[OddQ[n], 1, Denominator[-2*(2^(n - 1) - 1)*BernoulliB[n]]]; Table[a[n], {n, 0, 72}] (* Jean-François Alcover, Jan 30 2013 *)
    Table[Times @@ Select[Divisors@ n + 1, PrimeQ@ # && OddQ@ # &] + Boole[n == 0], {n, 0, 72}] (* Michael De Vlieger, Apr 30 2017 *)
  • PARI
    A141056(n) =
    {
        p = 1;
        if (n > 0,
            fordiv(n, d,
                r = d + 1;
                if (isprime(r) & r>2, p = p*r)
            )
        );
        return(p)
    }
    for(n=0, 72, print1(A141056(n), ", ")); \\ Peter Luschny, Nov 22 2015
    
  • Sage
    def A141459_list(size):
        f = x / sum(x^(n*2+1)/factorial(n*2+1) for n in (0..2*size))
        t = taylor(f, x, 0, size)
        return [(factorial(n)*s).denominator() for n,s in enumerate (t.list())]
    print(A141459_list(72)) # Peter Luschny, Jul 05 2016

Formula

a(2*n+1) = 1. a(2*n)= A001897(n).
a(n) = denominator(0^n + Sum_{j=1..n} zeta(1-j)*(2^j-2)*j*C(n,j)). - Peter Luschny, May 17 2015
Let P(x)= Sum_{n>=0} x^(2*n+1)/(2*n+1)! then a(n) = denominator( n! [x^n] x/P(x) ). - Peter Luschny, Jul 05 2016
a(n) = A157818(n)/4^n. See a comment under A157817, also for other Bernoulli numbers B[4,1] and B[4,3] with this denominator. - Wolfdieter Lang, Apr 28 2017

Extensions

1 prepended and offset set to 0 by Peter Luschny, May 17 2015
New name from Peter Luschny, Nov 22 2015

A176591 Bernoulli denominators A141056(n), with the exception a(1)=1.

Original entry on oeis.org

1, 1, 6, 2, 30, 2, 42, 2, 30, 2, 66, 2, 2730, 2, 6, 2, 510, 2, 798, 2, 330, 2, 138, 2, 2730, 2, 6, 2, 870, 2, 14322, 2, 510, 2, 6, 2, 1919190, 2, 6, 2, 13530, 2, 1806, 2, 690, 2, 282, 2, 46410, 2, 66, 2, 1590, 2, 798, 2, 870, 2, 354, 2, 56786730, 2, 6, 2, 510, 2, 64722, 2, 30, 2, 4686, 2, 140100870, 2, 6, 2, 30, 2
Offset: 0

Views

Author

Paul Curtz, Apr 21 2010

Keywords

Comments

These are also the denominators of a sequence generated by inverse binomial transform of a modified Bernoulli sequence described in (with numerators in) A176328.

Crossrefs

Programs

  • Maple
    read("transforms") ; evb := [1, 0, seq(bernoulli(n), n=2..50)] ; BINOMIALi(evb) ; apply(denom, %) ; # R. J. Mathar, Dec 01 2010
    seq(denom((bernoulli(i,1)+bernoulli(i,2))/2),i=0..50); # Peter Luschny, Jun 17 2012
  • Mathematica
    a[n_] := If[OddQ[n], 2, BernoulliB[n] // Denominator]; a[1] = 1; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 29 2012 *)
    Join[{1,1},BernoulliB[Range[2,80]]/.(0->1/2)//Denominator] (* Harvey P. Dale, Dec 31 2018 *)
  • PARI
    A176591(n) = { my(p=1); if(n>1, fordiv(n, d, my(r=d+1); if(isprime(r), p = p*r))); return(p); }; \\ Antti Karttunen, Dec 20 2018, after code in A141056

Formula

a(n) = A141056(n), n <> 1.
a(n) = A027760(n), n>1.
a(2n) = A002445(n), a(2n+1)= A040000(n).

Extensions

More terms from Antti Karttunen, Dec 20 2018

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

A128059 a(n) = numerator((2*n-1)^2/(2*(2*n)!)).

Original entry on oeis.org

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

Views

Author

Paul Barry, Feb 13 2007

Keywords

Comments

1's between primes correspond to odd nonprimes (see A047846).

Crossrefs

Essentially the odd bisection of A089026.

Programs

  • Haskell
    a128059 0 = 1
    a128059 n = f n n where
       f 1 _ = 1
       f x q = if a010051' q' == 1 then q' else f x' q'
               where x' = x - 1; q' = q + x'
    -- Reinhard Zumkeller, Jun 14 2015
    
  • Maple
    A128059 := proc(n): numer(((2*n-1)^2)/(2*(2*n)!)) end: seq(A128059(n), n=0..64); # Artur Jasinski, Nov 29 2008
    A128059 := proc(n): if isprime(2*n-1) then 2*n-1 else 1 fi: end: seq(A128059(n), n=0..64); # Johannes W. Meijer, Oct 25 2012, Jun 01 2016
  • Mathematica
    Table[Numerator[(2 n - 1)^2/(2 (2 n)!)], {n, 0, 64}] (* Michael De Vlieger, Jun 01 2016 *)
  • Python
    from sympy import isprime
    def A128059(n): return a if isprime(a:=(n<<1)-1) else 1 # Chai Wah Wu, Feb 26 2024

Formula

Conjecture: a(n) = denominator(f(n-1)) with f(n) = lcm(2,3,4,5,...,n)*(Sum_{k=0..n} frac(Bernoulli(2*k))*binomial(n+k,k)). - Yalcin Aktar, Jul 23 2008
a(n) = 2*n-3 if 2*n-3 is prime and a(n) = 1 otherwise. a(n+4) = A145737(n+2), for n >= 1. - Artur Jasinski, Nov 29 2008
a(n+1) = denominator( (2n)!/(2n+1) ), n > 0. - Wesley Ivan Hurt, Jun 19 2013
a(n+1) = abs(2n*(pi(2n) - pi(2n-2)) - 1) where abs is the absolute value function and pi is the prime counting function (A000720). - Anthony Browne, Jun 28 2016
a(n+1) = denominator(Bernoulli(2*n)*(2*n)!) = numerator(Clausen(2*n,1)/(2*n)!) with Clausen defined in A160014. - Peter Luschny, Sep 25 2016

A164020 Denominators of Bernoulli numbers interleaved with even numbers.

Original entry on oeis.org

1, 2, 6, 4, 30, 6, 42, 8, 30, 10, 66, 12, 2730, 14, 6, 16, 510, 18, 798, 20, 330, 22, 138, 24, 2730, 26, 6, 28, 870, 30, 14322, 32, 510, 34, 6, 36, 1919190, 38, 6, 40, 13530, 42, 1806, 44, 690, 46, 282, 48, 46410, 50, 66, 52, 1590, 54, 798, 56, 870, 58, 354, 60, 56786730
Offset: 0

Views

Author

Paul Curtz, Aug 08 2009

Keywords

Crossrefs

Programs

  • Magma
    [IsEven(n) select Denominator(Bernoulli(n)) else n+1: n in [0..100]]; // Vincenzo Librandi, Sep 08 2017
  • Mathematica
    a[n_]:=If[OddQ[n], n+1, BernoulliB[n] // Denominator]; Table[a[n], {n, 0, 60}](* Jean-François Alcover, Dec 29 2012 *)
    With[{nn=60},Riffle[Denominator[BernoulliB[Range[0,nn,2]]],Range[2,nn,2]]] (* Harvey P. Dale, Jul 18 2015 *)

Formula

a(2*n) = A002445(n).
a(2*n+1) = 2*(n+1).
a(n) divides A057643(n). Franklin T. Adams-Watters, Aug 03 2012

Extensions

Extended by R. J. Mathar, Sep 23 2009

A225498 Weak Carmichael numbers.

Original entry on oeis.org

9, 25, 27, 45, 49, 81, 121, 125, 169, 225, 243, 289, 325, 343, 361, 405, 529, 561, 625, 637, 729, 841, 891, 961, 1105, 1125, 1225, 1331, 1369, 1377, 1681, 1729, 1849, 2025, 2187, 2197, 2209, 2401, 2465, 2809, 2821, 3125, 3321, 3481
Offset: 1

Views

Author

Jonathan Vos Post, May 08 2013

Keywords

Comments

An odd composite number n > 1 is a weak Carmichael number iff the prime factors of n are a subset of the prime factors of Clausen(n-1,1) (cf. A160014). If additionally n divides Clausen(n-1,1) then n is a Carmichael number. - Peter Luschny, May 21 2019

Crossrefs

Programs

  • Maple
    with(numtheory): isweakCarmichael := proc(n)
    if irem(n, 2) = 0 or isprime(n) then return false fi;
    factorset(n) subset factorset(Clausen(n-1, 1)) end: # A160014
    select(isweakCarmichael, [$2..3500]); # Peter Luschny, May 21 2019
  • Mathematica
    pf[n_] := FactorInteger[n][[All,1]];
    Clausen[0, ] = 1; Clausen[n, k_] := Times @@ (Select[Divisors[n],
    PrimeQ[# + k] &] + k);
    weakCarmQ[n_] := If[EvenQ[n] || PrimeQ[n], Return[False], pf[n] == (pf[n] ~Intersection~ pf[Clausen[n-1,1]])];
    Select[Range[2,3500], weakCarmQ] (* Jean-François Alcover, Jun 03 2019 *)

A290694 Triangle read by rows, numerators of coefficients (in rising powers) of rational polynomials P(n, x) such that Integral_{x=0..1} P'(n, x) = Bernoulli(n, 1).

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 0, -1, 2, 0, 0, 1, -2, 3, 0, 0, -1, 14, -9, 24, 0, 0, 1, -10, 75, -48, 20, 0, 0, -1, 62, -135, 312, -300, 720, 0, 0, 1, -42, 903, -1680, 2800, -2160, 630, 0, 0, -1, 254, -1449, 40824, -21000, 27360, -17640, 4480
Offset: 0

Views

Author

Peter Luschny, Aug 24 2017

Keywords

Comments

Consider a family of integrals I_m(n) = Integral_{x=0..1} P'(n, x)^m with P'(n,x) = Sum_{k=0..n}(-1)^(n-k)*Stirling2(n, k)*k!*x^k (see A278075 for the coefficients).
I_1(n) are the Bernoulli numbers A164555/A027642, I_2(n) are the Bernoulli median numbers A212196/A181131, I_3(n) are the numbers A291449/A291450.
The coefficients of the polynomials P_n(x)^m are for m = 1 A290694/A290695 and for m = 2 A291447/A291448.
Only omega(Clausen(n)) = A001221(A160014(n,1)) = A067513(n) coefficients are rational numbers if n is even. For odd n > 1 there are two rational coefficients.
Let C_k(n) = [x^k] P_n(x), k > 0 and n even. Conjecture: k is a prime factor of Clausen(n) <=> k = denominator(C_k(n)) <=> k does not divide Stirling2(n, k-1)*(k-1)!. (Note that by a comment in A019538 Stirling2(n, k-1)*(k-1)! is the number of chain topologies on an n-set having k open sets.)

Examples

			Triangle starts:
[0, 1]
[0, 0,  1]
[0, 0, -1,   2]
[0, 0,  1,  -2,    3]
[0, 0, -1,  14,   -9,  24]
[0, 0,  1, -10,   75, -48,   20]
[0, 0, -1,  62, -135, 312, -300, 720]
The first few polynomials are:
P_0(x) = x.
P_1(x) =  (1/2)*x^2.
P_2(x) = -(1/2)*x^2 + (2/3)*x^3.
P_3(x) =  (1/2)*x^2 - 2*x^3 + (3/2)*x^4.
P_4(x) = -(1/2)*x^2 + (14/3)*x^3 - 9*x^4 + (24/5)*x^5.
P_5(x) =  (1/2)*x^2 - 10*x^3 + (75/2)*x^4 - 48*x^5 + 20*x^6.
P_6(x) = -(1/2)*x^2 + (62/3)*x^3 - 135*x^4 + 312*x^5 - 300*x^6 + (720/7)*x^7.
Evaluated at x = 1 this gives an additive decomposition of the Bernoulli numbers:
B(0) =     1 =    1.
B(1) =   1/2 =  1/2.
B(2) =   1/6 = -1/2 +  2/3.
B(3) =     0 =  1/2 -    2 + 3/2.
B(4) = -1/30 = -1/2 + 14/3 -    9 + 24/5.
B(5) =     0 =  1/2 -   10 + 75/2 -   48 +  20.
B(6) =  1/42 = -1/2 + 62/3 -  135 +  312 - 300 + 720/7.
		

Crossrefs

Programs

  • Maple
    BG_row := proc(m, n, frac, val) local F, g, v;
    F := (n, x) -> add((-1)^(n-k)*Stirling2(n,k)*k!*x^k, k=0..n):
    g := x -> int(F(n,x)^m, x):
    `if`(val = "val", subs(x=1, g(x)), [seq(coeff(g(x),x,j), j=0..m*n+1)]):
    `if`(frac = "num", numer(%), denom(%)) end:
    seq(BG_row(1, n, "num", "val"), n=0..16);         # A164555
    seq(BG_row(1, n, "den", "val"), n=0..16);         # A027642
    seq(print(BG_row(1, n, "num", "poly")), n=0..12); # A290694 (this seq.)
    seq(print(BG_row(1, n, "den", "poly")), n=0..12); # A290695
    # Alternatively:
    T_row := n -> numer(PolynomialTools:-CoefficientList(add((-1)^(n-j+1)*Stirling2(n, j-1)*(j-1)!*x^j/j, j=1..n+1), x)): for n from 0 to 6 do T_row(n) od;
  • Mathematica
    T[n_, k_] := If[k > 0, Numerator[StirlingS2[n, k - 1]*(k - 1)! / k], 0]; Table[T[n, k], {n, 0, 8}, {k, 0, n+1}] // Flatten

Formula

T(n, k) = Numerator(Stirling2(n, k - 1)*(k - 1)!/k) if k > 0 else 0; for n >= 0 and 0 <= k <= n+1.

A171080 a(n) = Product_{3 <= p <= 2*n+1, p prime} p^floor(2*n / (p - 1)).

Original entry on oeis.org

1, 3, 45, 945, 14175, 467775, 638512875, 1915538625, 488462349375, 194896477400625, 32157918771103125, 2218896395206115625, 3028793579456347828125, 9086380738369043484375, 3952575621190533915703125, 28304394023345413370350078125, 7217620475953080409439269921875
Offset: 0

Views

Author

N. J. A. Sloane, Sep 06 2010

Keywords

References

  • F. Hirzebruch, Topological Methods in Algebraic Geometry, Springer, 3rd. ed., 1966; Lemma 1.5.2, p. 13.

Crossrefs

Programs

  • Maple
    f:=proc(n) local q,t1; t1:=1; for q from 3 to 2*n+1 do if isprime(q) then t1:=t1*q^floor(2*n/(q-1)); fi; od; t1; end;
  • Mathematica
    a[n_] := Product[If[PrimeQ[q], q^Floor[2 n/(q - 1)], 1], {q, 3, 2 n + 1}]
    Table[a[n], {n, 0, 20}] (* Wolfgang Hintze, Oct 03 2014 *)
  • SageMath
    from functools import cache
    @cache
    def a_rec(n):
        if n == 0: return 1
        p = mul(s for s in map(lambda i: i+1, divisors(2*n)) if is_prime(s))
        return (p * a_rec(n - 1)) // 2
    print([a_rec(n) for n in range(17)])  # Peter Luschny, Dec 12 2023

Formula

From Peter Luschny, Dec 12 2023: (Start)
a(n) = (Clausen(2*n)*a(n-1))/2 for n > 0, where Clausen(n) = A160014(1, n).
a(n) = A091137(2*n) / 2^(2*n). (End)

A225481 a(n) = product{ p primes <= n+1 such that p divides n+1 or p-1 divides n }.

Original entry on oeis.org

1, 2, 6, 2, 30, 6, 42, 2, 30, 10, 66, 6, 2730, 14, 30, 2, 510, 6, 798, 10, 2310, 22, 138, 6, 2730, 26, 6, 14, 870, 30, 14322, 2, 5610, 34, 210, 6, 1919190, 38, 78, 10, 13530, 42, 1806, 22, 690, 46, 282, 6, 46410, 10, 1122, 26, 1590, 6, 43890, 14, 16530, 58
Offset: 0

Views

Author

Peter Luschny, May 29 2013

Keywords

Comments

a(n) is the product over the primes <= n+1 which satisfy the weak Clausen condition. The weak Clausen condition relaxes the Clausen condition (p-1)|n by logical disjunction with p|(n+1).

Examples

			a(20) = 2310 = 2*3*5*7*11, because {3, 7} are divisors of 21 and {2, 5, 11} meet the Clausen condition 'p-1 divides n'.
		

Crossrefs

Programs

  • Haskell
    a225481 n = product [p | p <- takeWhile (<= n + 1) a000040_list,
                             mod n (p - 1) == 0 || mod (n + 1) p == 0]
    -- Reinhard Zumkeller, Jun 10 2013
  • Maple
    divides := (a, b) -> b mod a = 0; primes := n -> select(isprime, [$2..n]);
    A225481 := n -> mul(k,k in select(p -> divides(p,n+1) or divides(p-1,n), primes(n+1))); seq(A225481(n), n = 0..57);
  • Mathematica
    a[n_] := Product[ If[ Divisible[n+1, p] || Divisible[n, p-1], p, 1], {p, Prime /@ Range @ PrimePi[n+1]}]; Table[a[n], {n, 0, 57}] (* Jean-François Alcover, Jun 07 2013 *)
  • Sage
    def divides(a, b): return b % a == 0
    def A225481(n):
        return mul(filter(lambda p: divides(p,n+1) or divides(p-1,n), primes(n+2)))
    [A225481(n) for n in (0..57)]
    

Formula

a(n) / A027760(n) = A226040(n) for n > 0.

A226040 a(n) = product{ p prime such that p divides n + 1 and p - 1 does not divide n }.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 7, 5, 1, 1, 3, 1, 5, 7, 11, 1, 3, 1, 13, 1, 7, 1, 15, 1, 1, 11, 17, 35, 3, 1, 19, 13, 5, 1, 21, 1, 11, 1, 23, 1, 3, 1, 5, 17, 13, 1, 3, 55, 7, 19, 29, 1, 15, 1, 31, 7, 1, 13, 33, 1, 17, 23, 35, 1, 3, 1, 37, 5, 19, 77, 39
Offset: 0

Views

Author

Peter Luschny, May 26 2013

Keywords

Examples

			a(41) = 21 = 3*7 = product({2,3,7} setminus {2}).
		

Crossrefs

Programs

  • Maple
    s:= (p, n) -> ((n+1) mod p = 0) and (n mod (p-1) <> 0);
    A226040 := n -> mul(z, z = select(p->s(p,n), select('isprime', [$2..n])));
    seq(A226040(n), n=0..77);
  • Mathematica
    a[n_] := Times @@ Select[ FactorInteger[n+1][[All, 1]], !Divisible[n, #-1] &]; a[0] = 1; Table[a[n], {n, 0, 77}] (* Jean-François Alcover, Jun 27 2013, after Maple *)
  • PARI
    a(n)=my(f=factor(n+1)[,1],s=1);prod(i=1,#f,if(n%(f[i]-1),f[i],1)) \\ Charles R Greathouse IV, Jun 27 2013
  • Sage
    def A226040(n):
        F = filter(lambda p: ((n+1) % p == 0) and (n % (p-1)), primes(n))
        return mul(F)
    [A226040(n) for n in (0..77)]
    

Formula

a(n) = A225481(n) / A141056(n).
Previous Showing 11-20 of 38 results. Next