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

A242193 Least prime p such that B_{2*n} == 0 (mod p) but there is no k < n with B_{2k} == 0 (mod p), or 1 if such a prime p does not exist, where B_m denotes the m-th Bernoulli number.

Original entry on oeis.org

1, 1, 1, 1, 5, 691, 7, 3617, 43867, 283, 11, 103, 13, 9349, 1721, 37, 17, 26315271553053477373, 19, 137616929, 1520097643918070802691, 59, 23, 653, 417202699, 577, 39409, 113161, 29, 2003, 31, 1226592271, 839, 101, 688531
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

Conjecture: a(n) is prime for any n > 4.
It is known that (-1)^(n-1)*B_{2*n} > 0 for all n > 0.
See also A242194 for a similar conjecture involving Euler numbers.

Examples

			a(14) = 9349 since the numerator of |B_{28}| is 7*9349*362903 with B_2*B_4*B_6*...*B_{26} not congruent to 0 modulo 9349, but B_{14} == 0 (mod 7).
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=Numerator[Abs[BernoulliB[2n]]]
    f[n_]:=FactorInteger[b[n]]
    p[n_]:=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
    Do[If[b[n]<2,Goto[cc]];Do[Do[If[Mod[b[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}]
    (* Second program: *)
    LPDtransform[n_, fun_] := Module[{d}, d[p_] := AllTrue[Range[n - 1], !Divisible[fun[#], p]&]; SelectFirst[FactorInteger[fun[n]][[All, 1]], d] /. Missing[_] -> 1];
    A242193list[sup_] := Table[LPDtransform[n, Function[k, Abs[BernoulliB[2k]] // Numerator]], {n, 1, sup}]
    A242193list[35] (* Jean-François Alcover, Jul 27 2019, after Peter Luschny *)
  • Sage
    def LPDtransform(n, fun):
        d = lambda p: all(not p.divides(fun(k)) for k in (1..n-1))
        return next((p for p in prime_divisors(fun(n)) if d(p)), 1)
    A242193list = lambda sup: [LPDtransform(n, lambda k: abs(bernoulli(2*k)).numerator()) for n in (1..sup)]
    print(A242193list(35)) # 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}]

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}]

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