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.

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.

This page as a plain text file.
%I A242193 #31 Aug 05 2019 02:49:51
%S A242193 1,1,1,1,5,691,7,3617,43867,283,11,103,13,9349,1721,37,17,
%T A242193 26315271553053477373,19,137616929,1520097643918070802691,59,23,653,
%U A242193 417202699,577,39409,113161,29,2003,31,1226592271,839,101,688531
%N 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.
%C A242193 Conjecture: a(n) is prime for any n > 4.
%C A242193 It is known that (-1)^(n-1)*B_{2*n} > 0 for all n > 0.
%C A242193 See also A242194 for a similar conjecture involving Euler numbers.
%H A242193 Peter Luschny, <a href="/A242193/b242193.txt">Table of n, a(n) for n = 1..103</a>, (a(1)..a(60) from Zhi-Wei Sun)
%H A242193 Z.-W. Sun, <a href="http://arxiv.org/abs/1405.0290">New observations on primitive roots modulo primes</a>, arXiv preprint arXiv:1405.0290 [math.NT], 2014.
%e A242193 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).
%t A242193 b[n_]:=Numerator[Abs[BernoulliB[2n]]]
%t A242193 f[n_]:=FactorInteger[b[n]]
%t A242193 p[n_]:=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
%t A242193 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}]
%t A242193 (* Second program: *)
%t A242193 LPDtransform[n_, fun_] := Module[{d}, d[p_] := AllTrue[Range[n - 1], !Divisible[fun[#], p]&]; SelectFirst[FactorInteger[fun[n]][[All, 1]], d] /. Missing[_] -> 1];
%t A242193 A242193list[sup_] := Table[LPDtransform[n, Function[k, Abs[BernoulliB[2k]] // Numerator]], {n, 1, sup}]
%t A242193 A242193list[35] (* _Jean-François Alcover_, Jul 27 2019, after _Peter Luschny_ *)
%o A242193 (Sage)
%o A242193 def LPDtransform(n, fun):
%o A242193     d = lambda p: all(not p.divides(fun(k)) for k in (1..n-1))
%o A242193     return next((p for p in prime_divisors(fun(n)) if d(p)), 1)
%o A242193 A242193list = lambda sup: [LPDtransform(n, lambda k: abs(bernoulli(2*k)).numerator()) for n in (1..sup)]
%o A242193 print(A242193list(35)) # _Peter Luschny_, Jul 26 2019
%Y A242193 Cf. A000040, A027641, A242169, A242170, A242171, A242173, A242194, A242195.
%K A242193 nonn
%O A242193 1,5
%A A242193 _Zhi-Wei Sun_, May 07 2014