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-9 of 9 results.

A242194 Least prime divisor of E_{2*n} which does not divide any E_{2*k} with k < n, or 1 if such a primitive prime divisor of E_{2*n} does not exist, where E_m denotes the m-th Euler number given by A122045.

Original entry on oeis.org

1, 5, 61, 277, 19, 13, 47, 17, 79, 41737, 31, 2137, 67, 29, 15669721, 930157, 4153, 37, 23489580527043108252017828576198947741, 41, 137, 587, 285528427091, 5516994249383296071214195242422482492286460673697, 5639, 53, 2749, 5303, 1459879476771247347961031445001033, 6821509
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

Conjecture: a(n) is prime for any n > 1.
It is known that (-1)^n*E_{2*n} > 0 for all n = 0, 1, ....
See also A242193 for a similar conjecture involving Bernoulli numbers.

Examples

			a(4) = 277 since E_8 = 5*277 with 277 not dividing E_2*E_4*E_6, but 5 divides E_4 = 5.
		

Crossrefs

Programs

  • Mathematica
    e[n_]:=Abs[EulerE[2n]]
    f[n_]:=FactorInteger[e[n]]
    p[n_]:=p[n]=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
    Do[If[e[n]<2,Goto[cc]];Do[Do[If[Mod[e[i],Part[p[n],k]]==0,Goto[aa]],{i,1,n-1}];Print[n," ",Part[p[n],k]];Goto[bb];Label[aa];Continue,{k,1,Length[p[n]]}];Label[cc];Print[n," ",1];Label[bb];Continue,{n,1,30}]
    (* Second program: *)
    LPDtransform[n_, fun_] := Module[{}, d[p_, m_] := d[p, m] = AllTrue[ Range[m-1], ! Divisible[fun[#], p]&]; f[m_] := f[m] = FactorInteger[ fun[m]][[All, 1]]; SelectFirst[f[n], d[#, n]&] /. Missing[_] -> 1];
    a[n_] := a[n] = LPDtransform[n, Function[k, Abs[EulerE[2k]]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 38}]  (* Jean-François Alcover, Jul 28 2019, non-optimized adaptation of Peter Luschny's Sage code *)
  • Sage
    # uses[LPDtransform from A242193]
    A242194list = lambda sup: [LPDtransform(n, lambda k: euler_number(2*k)) for n in (1..sup)]
    print(A242194list(16)) # Peter Luschny, Jul 26 2019

A242195 Least prime divisor of the n-th tangent number T_n which does not divide any T_k with k < n, or 1 if such a primitive prime divisor of T_n does not exist.

Original entry on oeis.org

1, 2, 1, 17, 31, 691, 43, 257, 73, 41, 89, 103, 2731, 113, 151, 37, 43691, 109, 174763, 61681, 337, 59, 178481, 97, 251, 157, 39409, 113161, 67, 1321, 266689, 641, 839, 101, 281, 433, 223, 229, 121369, 631
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

Conjecture: (i) a(n) is prime for any n > 3.
(ii) For the n-th Springer number S_n given by A001586, if n is greater than one and not equal to 5, then S_n has a prime divisor which does not divide any S_k with k < n.
See also A242193 and A242194 for similar conjectures involving Bernoulli numbers and Euler numbers.

Examples

			a(4) = 17 since T_4 = 2^4*17 with 17 dividing none of T_1 = 1, T_2 = 2 and T_3 = 2^4.
		

Crossrefs

Programs

  • Mathematica
    t[n_]:=(-1)^(n-1)*2^(2n)(2^(2n)-1)BernoulliB[2n]/(2n)
    f[n_]:=FactorInteger[t[n]]
    p[n_]:=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
    Do[If[t[n]<2,Goto[cc]];Do[Do[If[Mod[t[i],Part[p[n],k]]==0,Goto[aa]],{i,1,n-1}];Print[n," ",Part[p[n],k]];Goto[bb];Label[aa];Continue,{k,1,Length[p[n]]}];Label[cc];Print[n," ",1];Label[bb];Continue,{n,1,40}]
  • Sage
    # uses[LPDtransform from A242193]
    def Tnum(n): return (-1)^(n-1)*2^(2*n)*(2^(2*n)-1)*bernoulli(2*n)/(2*n)
    A242195list = lambda sup: [LPDtransform(n, Tnum) for n in (1..sup)]
    print(A242195list(40)) # Peter Luschny, Jul 26 2019

A242174 Least prime divisor of A005260(n) which does not divide any previous term A005260(k) with k < n, or 1 if such a primitive prime divisor of A005260(n) does not exist.

Original entry on oeis.org

2, 3, 41, 5, 7, 349, 61, 75617, 31, 13, 499, 643897693, 17, 19, 1729774061, 101, 2859112064587, 138407, 83, 167, 59, 29, 653, 257, 997540809461453561581, 347, 13679, 37, 160449179727717672892660463, 211, 151, 43, 97, 73, 47
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

Conjecture: a(n) is prime for any n > 0. In general, for any r > 2, if n is large enough then f_r(n) = sum_{k=0..n}C(n,k)^r has a prime divisor which does not divide any previous terms f_r(k) with k < n.

Examples

			a(3) = 41 since A005260(3) = 2^2*41 with 41 dividing none of A005260(1) = 2 and A005260(2) = 2*3^2.
		

Crossrefs

Programs

  • Mathematica
    u[n_]:=Sum[Binomial[n,k]^4,{k,0,n}]
    f[n_]:=FactorInteger[u[n]]
    p[n_]:=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
    Do[If[u[n]<2,Goto[cc]];Do[Do[If[Mod[u[i],Part[p[n],k]]==0,Goto[aa]],{i,1,n-1}];Print[n," ",Part[p[n],k]];Goto[bb];Label[aa];Continue,{k,1,Length[p[n]]}];Label[cc];Print[n," ",1];Label[bb];Continue,{n,1,35}]

A242207 Least prime divisor of the n-th Domb number D(n) which does not divide any D(k) with k < n, or 1 if such a primitive prime divisor of D(n) does not exist.

Original entry on oeis.org

2, 7, 1, 97, 11, 23, 19, 643, 659, 1753, 4922329, 613, 341447, 1193, 2213, 2040452101603, 491, 82461839, 733, 113, 1108394340978316050481, 1034497328556150923437, 593, 73, 17117, 804943, 422291, 1559, 858631, 337655751557
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

Conjecture: a(n) is prime except for n = 3.

Examples

			 a(4) = 97 since D(4) = 2^2*7*97 with 97 dividing none of D(1) = 2^2, D(2) = 2^2*7 and D(3) = 2^8.
		

Crossrefs

Programs

  • Mathematica
    d[n_]:=Sum[Binomial[n,k]^2*Binomial[2k,k]*Binomial[2(n-k),n-k],{k,0,n}]
    f[n_]:=FactorInteger[d[n]]
    p[n_]:=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
    Do[If[d[n]<2,Goto[cc]];Do[Do[If[Mod[d[i],Part[p[n],k]]==0,Goto[aa]],{i,1,n-1}];Print[n," ",Part[p[n],k]];Goto[bb];Label[aa];Continue,{k,1,Length[p[n]]}];Label[cc];Print[n," ",1];Label[bb];Continue,{n,1,30}]

A242210 Number of primes p < prime(n) such that the Bernoulli number B_{p-1} is a primitive root modulo prime(n).

Original entry on oeis.org

0, 0, 1, 2, 1, 2, 2, 1, 4, 2, 3, 6, 3, 2, 5, 6, 5, 7, 4, 6, 6, 10, 11, 12, 8, 10, 9, 12, 10, 13, 9, 9, 10, 10, 17, 11, 7, 11, 18, 22, 15, 11, 12, 15, 21, 15, 10, 15, 23, 18, 26, 15, 15, 22, 26, 22, 25, 19, 26, 22, 22, 20, 17, 23, 20, 28, 17, 18, 28, 22
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2. In other words, for any prime p > 3, there exists a prime q < p such that the Bernoulli number B_{q-1} is a primitive root modulo p.
(ii) For any prime p > 13, there exists a prime q < p such that the Euler number E_{q-1} is a primitive root modulo p.
We have verified part (i) for n up to 4.2*10^5, and part (ii) for primes p below 10^6.

Examples

			a(4) = 2 since 3 is a primitive root modulo prime(4) = 7, and both B_{2-1} = - 1/2 and B_{5-1} = - 1/30 are congruent to 3 modulo 7.
a(5) = 1 since B_{3-1} = 1/6 == 2 (mod 11) with 2 a primitive root modulo prime(5) = 11.
a(8) = 1 since B_{17-1} = -3617/510 == -4 (mod 19) with -4 a primitive root modulo prime(8) = 19.
		

Crossrefs

Programs

  • Mathematica
    rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2]
    f[k_]:=BernoulliB[Prime[k]-1]
    dv[n_]:=Divisors[n]
    Do[m=0;Do[If[rMod[f[k],Prime[n]]==0,Goto[aa]];Do[If[rMod[f[k]^(Part[dv[Prime[n]-1],i])-1,Prime[n]]==0,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];m=m+1;Label[aa];Continue,{k,1,n-1}];Print[n," ",m];Continue,{n,1,70}]

A242213 Least prime p < prime(n) such that the Bernoulli number B_{p-1} is a primitive root modulo prime(n), or 0 if such a prime p does not exist.

Original entry on oeis.org

0, 0, 2, 2, 3, 2, 3, 17, 2, 2, 7, 2, 3, 19, 2, 2, 3, 2, 17, 2, 7, 2, 3, 3, 13, 2, 2, 3, 3, 3, 3, 3, 3, 5, 2, 3, 3, 7, 2, 2, 3, 2, 2, 5, 2, 2, 5, 3, 3, 3, 3, 2, 7, 3, 3, 2, 2, 2, 3, 5, 11, 2, 13, 2, 11, 2, 5, 17, 3, 2
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

According to the conjecture in A242210, a(n) should be positive for all n > 2.

Examples

			a(7) = 3 since 3 is a primitive root modulo prime(7) = 17 but 2 is not.
		

Crossrefs

Programs

  • Mathematica
    rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2]
    f[k_]:=BernoulliB[Prime[k]-1]
    dv[n_]:=Divisors[n]
    Do[Do[If[rMod[f[k],Prime[n]]==0,Goto[aa]];Do[If[rMod[f[k]^(Part[dv[Prime[n]-1],i])-1,Prime[n]]==0,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];Print[n," ",Prime[k]];Goto[bb];Label[aa];Continue,{k,1,n-1}];Print[n," ",0];Label[bb];Continue,{n,1,70}]

A242223 Least prime p such that H(n) == 0 (mod p) but H(k) == 0 (mod p) for no 0 < k < n, or 1 if such a prime p does not exist, where H(n) denotes the n-th harmonic number sum_{k=1..n}1/k.

Original entry on oeis.org

1, 3, 11, 5, 137, 7, 1, 761, 7129, 61, 97, 13, 29, 1049, 41233, 17, 37, 19, 7440427, 11167027, 18858053, 23, 583859, 577, 109, 34395742267, 521, 375035183, 4990290163, 31, 2667653736673, 2917, 269, 3583, 397, 1297, 10839223, 199, 737281, 41
Offset: 1

Views

Author

Zhi-Wei Sun, May 08 2014

Keywords

Comments

Conjecture: a(n) is prime except for n = 1, 7.

Examples

			a(4) = 5 since H(4) = 25/12 == 0 (mod 5), but none of H(1) = 1, H(2) = 3/2 and H(3) = 11/6 is congruent to 0 modulo 5.
		

Crossrefs

Programs

  • Mathematica
    h[n_]:=Numerator[HarmonicNumber[n]]
    f[n_]:=FactorInteger[h[n]]
    p[n_]:=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
    Do[If[h[n]<2,Goto[cc]];Do[Do[If[Mod[h[i],Part[p[n],k]]==0,Goto[aa]],{i,1,n-1}];Print[n," ",Part[p[n],k]];Goto[bb];Label[aa];Continue,{k,1,Length[p[n]]}];Label[cc];Print[n," ",1];Label[bb];Continue,{n,1,40}]

A332300 The least prime factor of the numerator of Bernoulli(2*n), or 1 if the numerator is 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 691, 7, 3617, 43867, 283, 11, 103, 13, 7, 5, 37, 17, 26315271553053477373, 19, 137616929, 1520097643918070802691, 11, 23, 653, 5, 13, 39409, 7, 29, 2003, 31, 1226592271, 11, 17, 5, 3112655297839, 37, 19, 13, 631, 41, 233, 43, 11, 5, 23, 47, 7823741903
Offset: 0

Views

Author

Amiram Eldar, Feb 09 2020

Keywords

Comments

a(n)=5 if and only if n is in A017329. - Robert Israel, Feb 09 2020
From Chai Wah Wu, Feb 10 2020: (Start)
For n > 1, clearly if a(n) = n, then n is prime. However, the converse is not true. Prime numbers p such that a(p) != p are: 2, 3, 109, 167, 211, 227, 271, ...
Conjecture: for prime p > 3, p is a prime factor of the numerator of Bernoulli(2*p), thus the conjecture implies that a(p) <= p for prime p.
(End)

Examples

			a(10) = 283, since Bernoulli(2*10) = -174611/330, and 283 is the least prime factor of its numerator, 174611 = 283 * 617.
		

Crossrefs

Programs

  • Magma
    [n le 4 select 1 else Min(PrimeDivisors(Abs(Numerator(Bernoulli(2*n))))):n in [0..48]]; // Marius A. Burtea, Feb 09 2020
    
  • Mathematica
    Array[FactorInteger[Abs @ Numerator @  BernoulliB[2*#]][[1, 1]] &, 30, 0]
  • PARI
    a(n) = my(x=abs(numerator(bernfrac(2*n)))); if (x==1, 1, vecmin(factor(x)[,1])); \\ Michel Marcus, Feb 09 2020
    
  • Python
    from sympy import bernoulli, primefactors
    def A332300(n):
        x = abs(bernoulli(2*n).p)
        return 1 if x == 1 else min(primefactors(x)) # Chai Wah Wu, Feb 10 2020

Formula

a(n) = A020639(abs(A000367(n))).

A242292 Least prime divisor of 2^n - n which does not divide any 2^k - k with 0 < k < n, or 1 if such a primitive prime divisor of 2^n - n does not exist.

Original entry on oeis.org

1, 2, 5, 3, 1, 29, 11, 31, 503, 13, 7, 1021, 8179, 1637, 4679, 1, 8737, 131063, 524269, 262139, 2097131, 349, 131, 773, 271, 197, 457, 1493, 317, 17, 6733, 73, 41, 157109, 83, 53, 1741, 3329, 49977801259, 997, 149, 2199023255531, 61, 4398046511093, 3769453
Offset: 1

Views

Author

Zhi-Wei Sun, May 10 2014

Keywords

Comments

Conjecture: a(n) = 1 only for n = 1, 5, 16.
In constrast, a classical theorem of Bang asserts that if n > 1 is different from 6 then 2^n - 1 has a prime divisor which does not divide any 2^k - 1 with 0 < k < n.

Examples

			a(4) = 3 since 2^4 - 4 = 2^2*3 with 3 dividing none of 2^1 - 1 = 1, 2^2 - 2 = 2 and 2^3 - 3 = 5.
		

References

  • A. S. Bang, Taltheoretiske Undersgelser, Tidsskrift fur Mat. 4(1886), no. 5, 70--80, 130--137.

Crossrefs

Programs

  • Mathematica
    u[n_]:=2^n-n
    f[n_]:=FactorInteger[u[n]]
    p[n_]:=Table[Part[Part[f[n], k], 1], {k, 1, Length[f[n]]}]
    Do[If[u[n]<2, Goto[cc]]; Do[Do[If[Mod[u[i], Part[p[n], k]]==0, Goto[aa]], {i, 1, n-1}]; Print[n, " ", Part[p[n], k]]; Goto[bb]; Label[aa]; Continue, {k, 1, Length[p[n]]}]; Label[cc]; Print[n, " ", 1]; Label[bb]; Continue, {n, 1, 45}]
Showing 1-9 of 9 results.