A332300 The least prime factor of the numerator of Bernoulli(2*n), or 1 if the numerator is 1.
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
Keywords
Examples
a(10) = 283, since Bernoulli(2*10) = -174611/330, and 283 is the least prime factor of its numerator, 174611 = 283 * 617.
Links
- Chai Wah Wu, Table of n, a(n) for n = 0..191 (n = 0..103 from Amiram Eldar)
- S. S. Wagstaff, Jr., Factors of Bernoulli numbers.
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
Comments