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-10 of 32 results. Next

A000254 Unsigned Stirling numbers of first kind, s(n+1,2): a(n+1) = (n+1)*a(n) + n!.

Original entry on oeis.org

0, 1, 3, 11, 50, 274, 1764, 13068, 109584, 1026576, 10628640, 120543840, 1486442880, 19802759040, 283465647360, 4339163001600, 70734282393600, 1223405590579200, 22376988058521600, 431565146817638400, 8752948036761600000, 186244810780170240000
Offset: 0

Views

Author

Keywords

Comments

Number of permutations of n+1 elements with exactly two cycles.
Number of cycles in all permutations of [n]. Example: a(3) = 11 because the permutations (1)(2)(3), (1)(23), (12)(3), (13)(2), (132), (123) have 11 cycles altogether. - Emeric Deutsch, Aug 12 2004
Row sums of A094310: In the symmetric group S_n, each permutation factors into k independent cycles; a(n) = sum k over S_n. - Harley Flanders (harley(AT)umich.edu), Jun 28 2004
The sum of the top levels of the last column over all deco polyominoes of height n. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. Example: a(2)=3 because the deco polyominoes of height 2 are the vertical and horizontal dominoes, the levels of their last columns being 2 and 1, respectively. - Emeric Deutsch, Aug 12 2006
a(n) is divisible by n for all composite n >= 6. a(2*n) is divisible by 2*n + 1. - Leroy Quet, May 20 2007
For n >= 2 the determinant of the n-1 X n-1 matrix M(i,j) = i + 2 for i = j and 1 otherwise (i,j = 1..n-1). E.g., for n = 3 the determinant of [(3, 1), (1, 4)]. See 53rd Putnam Examination, 1992, Problem B5. - Franz Vrabec, Jan 13 2008, Mar 26 2008
The numerator of the fraction when we sum (without simplification) the terms in the harmonic sequence. (1 + 1/2 = 2/2 + 1/2 = 3/2; 3/2 + 1/3 = 9/6 + 2/6 = 11/6; 11/6 + 1/4 = 44/24 + 6/24 = 50/24;...). The denominator of this fraction is n!*A000142. - Eric Desbiaux, Jan 07 2009
The asymptotic expansion of the higher order exponential integral E(x,m=2,n=1) ~ exp(-x)/x^2*(1 - 3/x + 11/x^2 - 50/x^3 + 274/x^4 - 1764/x^5 + 13068/x^6 - ...) leads to the sequence given above. See A163931 and A028421 for more information. - Johannes W. Meijer, Oct 20 2009
a(n) is the number of permutations of [n+1] containing exactly 2 cycles. Example: a(2) = 3 because the permutations (1)(23), (12)(3), (13)(2) are the only permutations of [3] with exactly 2 cycles. - Tom Woodward (twoodward(AT)macalester.edu), Nov 12 2009
It appears that, with the exception of n= 4, a(n) mod n = 0 if n is composite and = n-1 if n is prime. - Gary Detlefs, Sep 11 2010
a(n) is a multiple of A025527(n). - Charles R Greathouse IV, Oct 16 2012
Numerator of harmonic number H(n) = Sum_{i=1..n} 1/i when not reduced. See A001008 (Wolstenholme numbers) for the reduced numerators. - Rahul Jha, Feb 18 2015
The Stirling transform of this sequence is A222058(n) (Harmonic-geometric numbers). - Anton Zakharov, Aug 07 2016
a(n) is the (n-1)-st elementary symmetric function of the first n numbers. - Anton Zakharov, Nov 02 2016
The n-th iterated integral of log(x) is x^n * (n! * log(x) - a(n))/(n!)^2 + a polynomial of degree n-1 with arbitrary coefficients. This can be proven using the recurrence relation a(n) = (n-1)! + n*a(n-1). - Mohsen Maesumi, Oct 31 2018
Primes p such that p^3 | a(p-1) are the Wolstenholme primes A088164. - Amiram Eldar and Thomas Ordowski, Aug 08 2019
Total number of left-to-right maxima (or minima) in all permutations of [n]. a(3) = 11 = 3+2+2+2+1+1: (1)(2)(3), (1)(3)2, (2)1(3), (2)(3)1, (3)12, (3)21. - Alois P. Heinz, Aug 01 2020

Examples

			(1-x)^-1 * (-log(1-x)) = x + 3/2*x^2 + 11/6*x^3 + 25/12*x^4 + ...
G.f. = x + x^2 + 5*x^3 + 14*x^4 + 94*x^5 + 444*x^6 + 3828*x^7 + 25584*x^8 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 833.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, identities 186-190.
  • N. Bleistein and R. A. Handelsman, Asymptotic Expansions of Integrals, Dover Publications, 1986, see page 2. MR0863284 (89d:41049)
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 217.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 226.
  • Shanzhen Gao, Permutations with Restricted Structure (in preparation).
  • K. Javorszky, Natural Orders: De Ordinibus Naturalibus, 2016, ISBN 978-3-99057-139-2.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    a:=[]; for n in [1..22] do a:=a cat [Abs(StirlingFirst(n,2))]; end for; a; // Marius A. Burtea, Jan 01 2020
  • Maple
    A000254 := proc(n) option remember; if n<=1 then n else n*A000254(n-1)+(n-1)!; fi; end: seq(A000254(n),n=0..21);
    a := n -> add(n!/k, k=1..n): seq(a(n), n=0..21); # Zerinvary Lajos, Jan 22 2008
  • Mathematica
    Table[ (PolyGamma[ m ]+EulerGamma) (m-1)!, {m, 1, 24} ] (* Wouter Meeussen *)
    Table[ n!*HarmonicNumber[n], {n, 0, 19}] (* Robert G. Wilson v, May 21 2005 *)
    Table[Sum[1/i,{i,1,n}]/Product[1/i,{i,1,n}],{n,1,30}] (* Alexander Adamchuk, Jul 11 2006 *)
    Abs[StirlingS1[Range[20],2]] (* Harvey P. Dale, Aug 16 2011 *)
    Table[Gamma'[n + 1] /. EulerGamma -> 0, {n, 0, 30}] (* Li Han, Feb 14 2024*)
  • Maxima
    a(n):=(-1)^(n+1)/2*(n+1)*sum(k*bern(k-1)*stirling1(n,k),k,1,n); /* Vladimir Kruchinin, Nov 20 2016 */
    
  • MuPAD
    A000254 := proc(n) begin n*A000254(n-1)+fact(n-1) end_proc: A000254(1) := 1:
    
  • PARI
    {a(n) = if( n<0, 0, (n+1)! / 2 * sum( k=1, n, 1 / k / (n+1-k)))} /* Michael Somos, Feb 05 2004 */
    
  • Sage
    [stirling_number1(i, 2) for i in range(1, 22)]  # Zerinvary Lajos, Jun 27 2008
    

Formula

Let P(n,X) = (X+1)*(X+2)*(X+3)*...*(X+n); then a(n) is the coefficient of X; or a(n) = P'(n,0). - Benoit Cloitre, May 09 2002
Sum_{k > 0} a(k) * x^k/ k!^2 = exp(x) *(Sum_{k>0} (-1)^(k+1) * x^k / (k * k!)). - Michael Somos, Mar 24 2004; corrected by Warren D. Smith, Feb 12 2006
a(n) is the coefficient of x^(n+2) in (-log(1-x))^2, multiplied by (n+2)!/2.
a(n) = n! * Sum_{i=1..n} 1/i = n! * H(n), where H(n) = A001008(n)/A002805(n) is the n-th harmonic number.
a(n) ~ 2^(1/2)*Pi^(1/2)*log(n)*n^(1/2)*e^-n*n^n. - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
E.g.f.: log(1 - x) / (x-1). (= (log(1 - x))^2 / 2 if offset 1). - Michael Somos, Feb 05 2004
D-finite with recurrence: a(n) = a(n-1) * (2*n - 1) - a(n-2) * (n - 1)^2, if n > 1. - Michael Somos, Mar 24 2004
a(n) = A081358(n)+A092691(n). - Emeric Deutsch, Aug 12 2004
a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*binomial(n, k)/k. - Vladeta Jovovic, Jan 29 2005
p^2 divides a(p-1) for prime p > 3. a(n) = (Sum_{i=1..n} 1/i) / Product_{i=1..n} 1/i. - Alexander Adamchuk, Jul 11 2006
a(n) = 3* A001710(n) + 2* A001711(n-3) for n > 2; e.g., 11 = 3*3 + 2*1, 50 = 3*12 + 2*7, 274 = 3*60 + 2*47, ... - Gary Detlefs, May 24 2010
a(n) = A138772(n+1) - A159324(n). - Gary Detlefs, Jul 05 2010
a(n) = A121633(n) + A002672(n). - Gary Detlefs, Jul 18 2010
a(n+1) = Sum_{i=1..floor((n-1)/2)} n!/((n-i)*i) + Sum_{i=ceiling(n/2)..floor(n/2)} n!/(2*(n-i)*i). - Shanzhen Gao, Sep 14 2010
From Gary Detlefs, Sep 11 2010: (Start)
a(n) = (a(n-1)*(n^2 - 2*n + 1) + (n + 1)!)/(n - 1) for n > 2.
It appears that, with the exception of n = 2, (a(n+1)^2 - a(n)^2) mod n^2 = 0 if n is composite and 4*n if n is prime.
It appears that, with the exception of n = 2, (a(n+1)^3 - a(n)^2) mod n = 0 if n is composite and n - 2 if n is prime.
It appears that, with the exception of n = 2, (a(n)^2 + a(n+1)^2) mod n = 0 if n is composite and = 2 if n is prime. (End)
a(n) = Integral_{x=0..oo} (x^n - n!)*log(x)*exp(-x) dx. - Groux Roland, Mar 28 2011
a(n) = 3*n!/2 + 2*(n-2)!*Sum_{k=0..n-3} binomial(k+2,2)/(n-2-k) for n >= 2. - Gary Detlefs, Sep 02 2011
a(n)/(n-1)! = ml(n) = n*ml(n-1)/(n-1) + 1 for n > 1, where ml(n) is the average number of random draws from an n-set with replacement until the total set has been observed. G.f. of ml: x*(1 - log(1 - x))/(1 - x)^2. - Paul Weisenhorn, Nov 18 2011
a(n) = det(|S(i+2, j+1)|, 1 <= i,j <= n-2), where S(n,k) are Stirling numbers of the second kind. - Mircea Merca, Apr 06 2013
E.g.f.: x/(1 - x)*E(0)/2, where E(k) = 2 + E(k+1)*x*(k + 1)/(k + 2). - Sergei N. Gladkovskii, Jun 01 2013 [Edited by Michael Somos, Nov 28 2013]
0 = a(n) * (a(n+4) - 6*a(n+3) + 7*a(n+2) - a(n+1)) - a(n+1) * (4*a(n+3) - 6*a(n+2) + a(n+1)) + 3*a(n+2)^2 unless n=0. - Michael Somos, Nov 28 2013
For a simple way to calculate the sequence, multiply n! by the integral from 0 to 1 of (1 - x^n)/(1 - x) dx. - Rahul Jha, Feb 18 2015
From Ilya Gutkovskiy, Aug 07 2016: (Start)
Inverse binomial transform of A073596.
a(n) ~ sqrt(2*Pi*n) * n^n * (log(n) + gamma)/exp(n), where gamma is the Euler-Mascheroni constant A001620. (End)
a(n) = ((-1)^(n+1)/2*(n+1))*Sum_{k=1..n} k*Bernoulli(k-1)*Stirling1(n,k). - Vladimir Kruchinin, Nov 20 2016
a(n) = (n)! * (digamma(n+1) + gamma), where gamma is the Euler-Mascheroni constant A001620. - Pedro Caceres, Mar 10 2018
From Andy Nicol, Oct 21 2021: (Start)
Gamma'(x) = a(x-1) - (x-1)!*gamma, where Gamma'(x) is the derivative of the gamma function at positive integers and gamma is the Euler-Mascheroni constant. E.g.:
Gamma'(1) = -gamma, Gamma'(2) = 1-gamma, Gamma'(3) = 3-2*gamma,
Gamma'(22) = 186244810780170240000 - 51090942171709440000*gamma. (End)
From Peter Bala, Feb 03 2022: (Start)
The following are all conjectural:
E.g.f.: for nonzero m, (1/m)*Sum_{n >= 1} (-1)^(n+1)*(1/n)*binomial(m*n,n)* x^n/(1 - x)^(m*n+1) = x + 3*x^2/2! + 11*x^3/3! + 50*x^4/4! + ....
For nonzero m, a(n) = (1/m)*n!*Sum_{k = 1..n} (-1)^(k+1)*(1/k)*binomial(m*k,k)* binomial(n+(m-1)*k,n-k).
a(n)^2 = (1/2)*n!^2*Sum_{k = 1..n} (-1)^(k+1)*(1/k^2)*binomial(n,k)* binomial(n+k,k). (End)
From Mélika Tebni, Jun 20 2022: (Start)
a(n) = -Sum_{k=0..n} k!*A021009(n, k+1).
a(n) = Sum_{k=0..n} k!*A094587(n, k+1). (End)
a(n) = n! * 1/(1 - 1^2/(3 - 2^2/(5 - 3^2/(7 - ... - (n - 1)^2/((2*n - 1)))))). - Peter Bala, Mar 16 2024

A001220 Wieferich primes: primes p such that p^2 divides 2^(p-1) - 1.

Original entry on oeis.org

1093, 3511
Offset: 1

Views

Author

Keywords

Comments

Sequence is believed to be infinite.
Joseph Silverman showed that the abc-conjecture implies that there are infinitely many primes which are not in the sequence. - Benoit Cloitre, Jan 09 2003
Graves and Murty (2013) improved Silverman's result by showing that for any fixed k > 1, the abc-conjecture implies that there are infinitely many primes == 1 (mod k) which are not in the sequence. - Jonathan Sondow, Jan 21 2013
The squares of these numbers are Fermat pseudoprimes to base 2 (A001567) and Catalan pseudoprimes (A163209). - T. D. Noe, May 22 2003
Primes p that divide the numerator of the harmonic number H((p-1)/2); that is, p divides A001008((p-1)/2). - T. D. Noe, Mar 31 2004
In a 1977 paper, Wells Johnson, citing a suggestion from Lawrence Washington, pointed out the repetitions in the binary representations of the numbers which are one less than the two known Wieferich primes; i.e., 1092 = 10001000100 (base 2); 3510 = 110110110110 (base 2). It is perhaps worth remarking that 1092 = 444 (base 16) and 3510 = 6666 (base 8), so that these numbers are small multiples of repunits in the respective bases. Whether this is mathematically significant does not appear to be known. - John Blythe Dobson, Sep 29 2007
A002326((a(n)^2 - 1)/2) = A002326((a(n)-1)/2). - Vladimir Shevelev, Jul 09 2008, Aug 24 2008
It is believed that p^2 does not divide 3^(p-1) - 1 if p = a(n). This is true for n = 1 and 2. See A178815, A178844, A178900, and Ostafe-Shparlinski (2010) Section 1.1. - Jonathan Sondow, Jun 29 2010
These primes also divide the numerator of the harmonic number H(floor((p-1)/4)). - H. Eskandari (hamid.r.eskandari(AT)gmail.com), Sep 28 2010
1093 and 3511 are prime numbers p satisfying congruence 429327^(p-1) == 1 (mod p^2). Why? - Arkadiusz Wesolowski, Apr 07 2011. Such bases are listed in A247208. - Max Alekseyev, Nov 25 2014. See A269798 for all such bases, prime and composite, that are not powers of 2. - Felix Fröhlich, Apr 07 2018
A196202(A049084(a(1))) = A196202(A049084(a(2))) = 1. - Reinhard Zumkeller, Sep 29 2011
If q is prime and q^2 divides a prime-exponent Mersenne number, then q must be a Wieferich prime. Neither of the two known Wieferich primes divide Mersenne numbers. See Will Edgington's Mersenne page in the links below. - Daran Gill, Apr 04 2013
There are no other terms below 4.97*10^17 as established by PrimeGrid (see link below). - Max Alekseyev, Nov 20 2015. The search was done via PrimeGrid's PRPNet and the results were not double-checked. Because of the unreliability of the testing, the search was suspended in May 2017 (cf. Goetz, 2017). - Felix Fröhlich, Apr 01 2018. On Nov 28 2020, PrimeGrid has resumed the search (cf. Reggie, 2020). - Felix Fröhlich, Nov 29 2020. As of Dec 29 2022, PrimeGrid has completed the search to 2^64 (about 1.8 * 10^19) and has no plans to continue further. - Charles R Greathouse IV, Sep 24 2024
Are there other primes q >= p such that q^2 divides 2^(p-1)-1, where p is a prime? - Thomas Ordowski, Nov 22 2014. Any such q must be a Wieferich prime. - Max Alekseyev, Nov 25 2014
Primes p such that p^2 divides 2^r - 1 for some r, 0 < r < p. - Thomas Ordowski, Nov 28 2014, corrected by Max Alekseyev, Nov 28 2014
For some reason, both p=a(1) and p=a(2) also have more bases b with 1 < b < p that make b^(p-1) == 1 (mod p^2) than any smaller prime p; in other words, a(1) and a(2) belong to A248865. - Jeppe Stig Nielsen, Jul 28 2015
Let r_1, r_2, r_3, ..., r_i be the set of roots of the polynomial X^((p-1)/2) - (p-3)! * X^((p-3)/2) - (p-5)! * X^((p-5)/2) - ... - 1. Then p is a Wieferich prime iff p divides sum{k=1, p}(r_k^((p-1)/2)) (see Example 2 in Jakubec, 1994). - Felix Fröhlich, May 27 2016
Arthur Wieferich showed that if p is not a term of this sequence, then the First Case of Fermat's Last Theorem has no solution in x, y and z for prime exponent p (cf. Wieferich, 1909). - Felix Fröhlich, May 27 2016
Let U_n(P, Q) be a Lucas sequence of the first kind, let e be the Legendre symbol (D/p) and let p be a prime not dividing 2QD, where D = P^2 - 4*Q. Then a prime p such that U_(p-e) == 0 (mod p^2) is called a "Lucas-Wieferich prime associated to the pair (P, Q)". Wieferich primes are those Lucas-Wieferich primes that are associated to the pair (3, 2) (cf. McIntosh, Roettger, 2007, p. 2088). - Felix Fröhlich, May 27 2016
Any repeated prime factor of a term of A000215 is a term of this sequence. Thus, if there exist infinitely many Fermat numbers that are not squarefree, then this sequence is infinite, since no two Fermat numbers share a common factor. - Felix Fröhlich, May 27 2016
If the Diophantine equation p^x - 2^y = d has more than one solution in positive integers (x, y), with (p, d) not being one of the pairs (3, 1), (3, -5), (3, -13) or (5, -3), then p is a term of this sequence (cf. Scott, Styer, 2004, Corollary to Theorem 2). - Felix Fröhlich, Jun 18 2016
Odd primes p such that Chi_(D_0)(p) != 1 and Lambda_p(Q(sqrt(D_0))) != 1, where D_0 < 0 is the fundamental discriminant of the imaginary quadratic field Q(sqrt(1-p^2)) and Chi and Lambda are Iwasawa invariants (cf. Byeon, 2006, Proposition 1 (i)). - Felix Fröhlich, Jun 25 2016
If q is an odd prime, k, p are primes with p = 2*k+1, k == 3 (mod 4), p == -1 (mod q) and p =/= -1 (mod q^3) (Jakubec, 1998, Corollary 2 gives p == -5 (mod q) and p =/= -5 (mod q^3)) with the multiplicative order of q modulo k = (k-1)/2 and q dividing the class number of the real cyclotomic field Q(Zeta_p + (Zeta_p)^(-1)), then q is a term of this sequence (cf. Jakubec, 1995, Theorem 1). - Felix Fröhlich, Jun 25 2016
From Felix Fröhlich, Aug 06 2016: (Start)
Primes p such that p-1 is in A240719.
Prime terms of A077816 (cf. Agoh, Dilcher, Skula, 1997, Corollary 5.9).
p = prime(n) is in the sequence iff T(2, n) > 1, where T = A258045.
p = prime(n) is in the sequence iff an integer k exists such that T(n, k) = 2, where T = A258787. (End)
Conjecture: an integer n > 1 such that n^2 divides 2^(n-1)-1 must be a Wieferich prime. - Thomas Ordowski, Dec 21 2016
The above conjecture is equivalent to the statement that no "Wieferich pseudoprimes" (WPSPs) exist. While base-b WPSPs are known to exist for several bases b > 1 other than 2 (see for example A244752), no base-2 WPSPs are known. Since two necessary conditions for a composite to be a base-2 WPSP are that, both, it is a base-2 Fermat pseudoprime (A001567) and all its prime factors are Wieferich primes (cf. A270833), as shown in the comments in A240719, it seems that the first base-2 WPSP, if it exists, is probably very large. This appears to be supported by the guess that the properties of a composite to be a term of A001567 and of A270833 are "independent" of each other and by the observation that the scatterplot of A256517 seems to become "less dense" at the x-axis parallel line y = 2 for increasing n. It has been suggested in the literature that there could be asymptotically about log(log(x)) Wieferich primes below some number x, which is a function that grows to infinity, but does so very slowly. Considering the above constraints, the number of WPSPs may grow even more slowly, suggesting any such number, should it exist, probably lies far beyond any bound a brute-force search could reach in the forseeable future. Therefore I guess that the conjecture may be false, but a disproof or the discovery of a counterexample are probably extraordinarily difficult problems. - Felix Fröhlich, Jan 18 2019
Named after the German mathematician Arthur Josef Alwin Wieferich (1884-1954). a(1) = 1093 was found by Waldemar Meissner in 1913. a(2) = 3511 was found by N. G. W. H. Beeger in 1922. - Amiram Eldar, Jun 05 2021
From Jianing Song, Jun 21 2025: (Start)
The ring of integers of Q(2^(1/k)) is Z[2^(1/k)] if and only if k does not have a prime factor in this sequence (k is in A342390). See Theorem 5.3 of the paper of Keith Conrad. For example, we have:
(1 + 2^(364/1093) + 2^(2*364/1093) + ... + 2^(1092*364/1093))/1093 is an algebraic integer, but it is not in Z[2^(1/1093)];
(1 + 2^(1755/3511) + 2^(2*1755/3511) + ... + 2^(3510*1755/3511))/3511 is an algebraic integer, but it is not in Z[2^(1/3511)]. (End)

References

  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 28.
  • Richard K. Guy, Unsolved Problems in Number Theory, A3.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 91.
  • Yves Hellegouarch, "Invitation aux mathématiques de Fermat Wiles", Dunod, 2eme Edition, pp. 340-341.
  • Pace Nielsen, Wieferich primes, heuristics, computations, Abstracts Amer. Math. Soc., 33 (#1, 20912), #1077-11-48.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 263.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 230-234.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, NY, 1986, p. 163.

Crossrefs

Cf. similar primes related to the first case of Fermat's last theorem: A007540, A088164.
Sequences "primes p such that p^2 divides X^(p-1)-1": A014127 (X=3), A123692 (X=5), A212583 (X=6), A123693 (X=7), A045616 (X=10), A111027 (X=12), A128667 (X=13), A234810 (X=14), A242741 (X=15), A128668 (X=17), A244260 (X=18), A090968 (X=19), A242982 (X=20), A298951 (X=22), A128669 (X=23), A306255 (X=26), A306256 (X=30).

Programs

  • GAP
    Filtered([1..50000],p->IsPrime(p) and (2^(p-1)-1) mod p^2 =0); # Muniru A Asiru, Apr 03 2018
    
  • Haskell
    import Data.List (elemIndices)
    a001220 n = a001220_list !! (n-1)
    a001220_list = map (a000040 . (+ 1)) $ elemIndices 1 a196202_list
    -- Reinhard Zumkeller, Sep 29 2011
    
  • Magma
    [p : p in PrimesUpTo(310000) | IsZero((2^(p-1) - 1) mod (p^2))]; // Vincenzo Librandi, Jan 19 2019
  • Maple
    wieferich := proc (n) local nsq, remain, bin, char: if (not isprime(n)) then RETURN("not prime") fi: nsq := n^2: remain := 2: bin := convert(convert(n-1, binary),string): remain := (remain * 2) mod nsq: bin := substring(bin,2..length(bin)): while (length(bin) > 1) do: char := substring(bin,1..1): if char = "1" then remain := (remain * 2) mod nsq fi: remain := (remain^2) mod nsq: bin := substring(bin,2..length(bin)): od: if (bin = "1") then remain := (remain * 2) mod nsq fi: if remain = 1 then RETURN ("Wieferich prime") fi: RETURN ("non-Wieferich prime"): end: # Ulrich Schimke (ulrschimke(AT)aol.com), Nov 01 2001
  • Mathematica
    Select[Prime[Range[50000]],Divisible[2^(#-1)-1,#^2]&]  (* Harvey P. Dale, Apr 23 2011 *)
    Select[Prime[Range[50000]],PowerMod[2,#-1,#^2]==1&] (* Harvey P. Dale, May 25 2016 *)
  • PARI
    N=10^4; default(primelimit,N);
    forprime(n=2,N,if(Mod(2,n^2)^(n-1)==1,print1(n,", ")));
    \\ Joerg Arndt, May 01 2013
    
  • Python
    from sympy import prime
    from gmpy2 import powmod
    A001220_list = [p for p in (prime(n) for n in range(1,10**7)) if powmod(2,p-1,p*p) == 1]
    # Chai Wah Wu, Dec 03 2014
    

Formula

(A178815(A000720(p))^(p-1) - 1) mod p^2 = A178900(n), where p = a(n). - Jonathan Sondow, Jun 29 2010
Odd primes p such that A002326((p^2-1)/2) = A002326((p-1)/2). See A182297. - Thomas Ordowski, Feb 04 2014

A007395 Constant sequence: the all 2's sequence.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Keywords

Comments

Continued fraction for 1 + sqrt(2). - Philippe Deléham, Nov 14 2006
a(n) = A213999(n,1). - Reinhard Zumkeller, Jul 03 2012
The least witness function W(k) is defined for odd composite numbers k. The sequence W(k) does not have its own entry in the OEIS because W(k) = 2 for all k with 9 <= k < 2047; then W(2047)=3. Cf. A089105. - N. J. A. Sloane, Sep 17 2014
a(n) = A254858(n-1,1). - Reinhard Zumkeller, Feb 09 2015
a(n) = number of permutations of length n+2 having exactly one ascent such that the first element the permutation is 2. - Ran Pan, Apr 20 2015
With alternating signs, this is the sequence of determinants of the 3 X 3 matrices m with m(i,j) = Fibonacci(n+i+j-2)^2. - Michel Marcus, Dec 23 2015
For p = prime(n+2), a(n) = ord_p(H_(p-1)), where ord_p denotes the p-adic valuation and H_i = 1 + 1/2 + ... + 1/i is a harmonic sum, except for n = 1944 and n = 157504, where ord_p(H_(p-1)) = 3, and any other term of A088164 that may exist (see Conrad link). The sequence a(n) = ord_p(H_(p-1)) does not have its own entry in the OEIS. - Felix Fröhlich, Mar 16 2016
This sequence is the only infinite bounded sequence of positive integers such that a(n) = (a(n-1) + a(n-2)) / gcd(a(n-1), a(n-2)) for all n >= 2. - Bernard Schott, Dec 28 2018

References

  • Titu Andreescu and Dorin Andrica, Number Theory, Birkhäuser, 2009, from 1999 Russian Mathematical Olympiad, p. 347.
  • Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 6.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

G.f.: 2/(1-x), and e.g.f.: 2*e^x. - Mohammad K. Azarian, Dec 22 2008
a(n) = A000005(A000040(n)). - Omar E. Pol, Feb 28 2018
a(n) = A002061(n) - A165900(n). - Torlach Rush, Feb 21 2019

A001819 Central factorial numbers: second right-hand column of triangle A008955.

Original entry on oeis.org

0, 1, 5, 49, 820, 21076, 773136, 38402064, 2483133696, 202759531776, 20407635072000, 2482492033152000, 359072203696128000, 60912644957448192000, 11977654199703478272000, 2702572249389834608640000
Offset: 0

Views

Author

Keywords

Comments

Coefficient of x^2 in Product_{k=0..n}(x + k^2). - Ralf Stephan, Aug 22 2004
p divides a(p-1) for prime p > 3. p divides a((p-1)/2) for prime p > 3. For prime p, p^2 divides a(n) for n > 2*p+1. - Alexander Adamchuk, Jul 11 2006; last comment corrected by Michel Marcus, May 20 2020
The ratio a(n)/A001044(n) is the partial sum of the reciprocals of squares. E.g., a(4)/A001044(4) = 820/576 = 1/1 + 1/4 + 1/9 + 1/16. - Pierre CAMI, Oct 30 2006
a(n) is the (n-1)-st elementary symmetric function of the squares of the first n numbers. - Anton Zakharov, Nov 06 2016
Primes p such that p^2 | a(p-1) are the Wolstenholme primes A088164. - Amiram Eldar and Thomas Ordowski, Aug 08 2019

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Second right-hand column of triangle A008955.
Equals row sums of A162990(n)/(n+1)^2 for n >= 1.

Programs

Formula

a_n = (n!)^2 * Sum_{k=1..n} 1/k^2. - Joe Keane (jgk(AT)jgk.org)
a(n) ~ (1/3)*Pi^3*n*e^(-2*n)*n^(2*n). - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
Sum_{n>=0} a(n)*x^n/n!^2 = polylog(2, x)/(1-x). - Vladeta Jovovic, Jan 23 2003
a(n) = Sum_{i=1..n} 1/i^2 / Product_{i=1..n} 1/i^2. - Alexander Adamchuk, Jul 11 2006
a(0) = 0, a(n) = a(n-1)*n^2 + A001044(n-1). E.g., a(1) = 0*1 + 1 = 1 since A001044(0) = 1; a(2) = 1*2^2 + 1 = 5 since A001044(1) = 1; a(3) = 5*3^2 + 4 = 49 since A001044(2) = 4; and so on. - Pierre CAMI, Oct 30 2006
Recurrence: a(0) = 0, a(1) = 1, a(n+1) = (2*n^2 + 2*n + 1)*a(n) - n^4*a(n-1). The sequence b(n) = n!^2 satisfies the same recurrence with the initial conditions b(0) = 1, b(1) = 1. Hence we obtain the finite continued fraction expansion a(n)/b(n) = 1/(1 - 1^4/(5 - 2^4/(13 - 3^4/(25 - ... -(n-1)^4/((2*n^2 - 2*n + 1)))))), leading to the infinite continued fraction expansion zeta(2) = 1/(1-1^4/(5 - 2^4/(13 - 3^4/(25 - ... - n^4/((2*n^2 + 2*n + 1) - ...))))). Compare with A142995. Compare also with A024167 and A066989. - Peter Bala, Jul 18 2008
a(n)/(n!)^2 -> zeta(2) = A013661 as n -> infinity, rewriting the Keane formula. - Najam Haq (njmalhq(AT)yahoo.com), Jan 13 2010
a(n) = s(n+1,2)^2 - 2*s(n+1,1)*s(n+1,3), where s(n,k) are Stirling numbers of the first kind, A048994. - Mircea Merca, Apr 03 2012

Extensions

Minor edits by Vaclav Kotesovec, Jan 28 2015

A025529 a(n) = (1/1 + 1/2 + ... + 1/n)*lcm{1,2,...,n}.

Original entry on oeis.org

1, 3, 11, 25, 137, 147, 1089, 2283, 7129, 7381, 83711, 86021, 1145993, 1171733, 1195757, 2436559, 42142223, 42822903, 825887397, 837527025, 848612385, 859193865, 19994251455, 20217344325, 102157567401, 103187226801, 312536252003, 315404588903, 9227046511387
Offset: 1

Views

Author

Keywords

Comments

First column of A027446. - Eric Desbiaux, Mar 29 2013
From Amiram Eldar and Thomas Ordowski, Aug 07 2019: (Start)
By Wolstenholme's theorem, if p > 3 is a prime, then p^2 | a(p-1).
Conjecture: for n > 3, if n^2 | a(n-1), then n is a prime.
Note that if n = p^2 with prime p > 3, then n | a(n-1).
It seems that composite numbers n such that n | a(n-1) are only the squares n = p^2 of primes p > 3.
Primes p such that p^3 | a(p-1) are the Wolstenholme primes A088164.
The n-th triangular number n(n+1)/2 | a(n) for n = 1, 2, 6, 4422, ... (End)

Crossrefs

Differs from A096617 at 7th term.

Programs

  • GAP
    List([1..30],n->Sum([1..n],k->1/k)*Lcm([1..n])); # Muniru A Asiru, Apr 02 2018
    
  • Magma
    [HarmonicNumber(n)*Lcm([1..n]):n in [1..30]]; // Marius A. Burtea, Aug 07 2019
  • Maple
    a:= n-> add(1/k, k=1..n)*ilcm($1..n):
    seq(a(n), n=1..30);  # Alois P. Heinz, Mar 14 2013
  • Mathematica
    Table[HarmonicNumber[n]*LCM @@ Range[n], {n, 27}] (* Arkadiusz Wesolowski, Mar 29 2012 *)
  • PARI
    a(n) = sum(k=1, n, 1/k)*lcm([1..n]); \\ Michel Marcus, Apr 02 2018
    

Formula

a(n) = A001008(n)*A110566(n). - Arkadiusz Wesolowski, Mar 29 2012
a(n) = Sum_{k=1..n} lcm(1,2,...,n)/k. - Thomas Ordowski, Aug 07 2019

A099908 C(2n-1,n-1) mod n^4.

Original entry on oeis.org

0, 3, 10, 35, 126, 462, 1716, 2339, 4627, 2378, 1332, 4238, 2198, 5148, 1260, 57635, 14740, 85026, 61732, 64410, 100509, 163716, 158172, 171918, 93876, 309780, 148969, 444220, 268280, 370712, 29792, 532771, 652200, 938386, 816466, 907874
Offset: 1

Views

Author

Henry Bottomley, Oct 29 2004

Keywords

Comments

a(16843)=a(2124679)=1 meaning that 16843 and 2124679 are Wolstenholme primes A088164.

Examples

			a(11) =352716 mod 1461 =1332.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Binomial[2n-1,n-1],n^4],{n,40}] (* Harvey P. Dale, Dec 12 2021 *)
  • Python
    from _future_ import division
    A099908_list, b = [], 1
    for n in range(1,10001):
        A099908_list.append(b % n**4)
        b = b*2*(2*n+1)//(n+1) # Chai Wah Wu, Jan 26 2016

A128673 Numbers m such that m^k does not divide the denominator of the m-th generalized harmonic number H(m,k) nor the denominator of the m-th alternating generalized harmonic number H'(m,k), for k = 3.

Original entry on oeis.org

94556602, 141834903, 189113204, 283669806, 450820422
Offset: 1

Views

Author

Alexander Adamchuk, Apr 18 2007

Keywords

Comments

Generalized harmonic numbers are defined as H(m,k) = Sum_{j=1..m} 1/j^k. Alternating generalized harmonic numbers are defined as H'(m,k) = Sum_{j=1..m} (-1)^(j+1)/j^k.
Note that {a(n)} contains the following geometric progressions: ((16843-1)/3)*16843^m found by Max Alekseyev, ((16843-1)/2)*16843^m found by Max Alekseyev, ((16843-1)*2/3)*16843^m, (16843-1)*16843^m, 20826*21647^m found by Max Alekseyev, ((2124679-1)/3)*2124679^m, ((2124679-1)/2)*2124679^m, ((2124679-1)*2/3)*2124679^m, (2124679-1)*2124679^m. Here {16843, 2124679} = A088164 are the only two currently known Wolstenholme Primes: primes p such that {2p-1} choose {p-1} == 1 mod p^4. See more details in Comments at A128672 and A125581.

Crossrefs

Programs

  • Mathematica
    k=3; f=0; g=0; Do[ f=f+1/n^k; g=g+(-1)^(n+1)*1/n^k; kf=Denominator[f]; kg=Denominator[g]; If[ !IntegerQ[kf/n^k] && !IntegerQ[kg/n^k], Print[n] ], {n, 1, 450820422} ]

A330718 a(n) = numerator(Sum_{k=1..n} (2^k-2)/k).

Original entry on oeis.org

0, 1, 3, 13, 25, 137, 245, 871, 517, 4629, 8349, 45517, 83317, 1074679, 1992127, 7424789, 13901189, 78403447, 147940327, 280060651, 531718651, 11133725681, 21243819521, 40621501691, 15565330735, 388375065019, 248882304985, 479199924517, 923951191477, 2973006070891
Offset: 1

Views

Author

Amiram Eldar and Thomas Ordowski, Dec 28 2019

Keywords

Comments

If p > 3 is prime, then p^2 | a(p).
Note the similarity to Wolstenholme's theorem.
Conjecture: for n > 3, if n^2 | a(n), then n is prime.
Are there the weak pseudoprimes m such that m | a(m)?
Primes p such that p^3 | a(p) are probably A088164.
If p is an odd prime, then a(p+1) == A330719(p+1) (mod p).
If p > 3 is a prime, then p^2 | numerator(Sum_{k=1..p+1} F(k)), where F(n) = Sum_{k=1..n} (2^(k-1)-1)/k. Cf. A027612 (a weaker divisibility).

Examples

			Numerators of 0, 1, 3, 13/2, 25/2, 137/6, 245/6, ...
		

Crossrefs

Programs

  • Magma
    [Numerator( &+[(2^k -2)/k: k in [1..n]] ): n in [1..30]]; // G. C. Greubel, Dec 28 2019
    
  • Maple
    seq(numer(add((2^k -2)/k, k = 1..n)), n = 1..30); # G. C. Greubel, Dec 28 2019
  • Mathematica
    Numerator @ Accumulate @ Array[(2^# - 2)/# &, 30]
    Table[Numerator[Simplify[-(2^(n+1)*LerchPhi[2,1,n+1] +Pi*I +2*HarmonicNumber[n])]], {n,30}] (* G. C. Greubel, Dec 28 2019 *)
  • PARI
    a(n) = numerator(sum(k=1, n, (2^k-2)/k)); \\ Michel Marcus, Dec 28 2019
    
  • Sage
    [numerator( sum((2^k -2)/k for k in (1..n)) ) for n in (1..30)] # G. C. Greubel, Dec 28 2019

Formula

a(n) = numerator(Sum_{k=1..n} (2^(k-1)-1)/k).
a(n+1) = numerator(a(n)/A330719(n) + A225101(n+1)/(2*A159353(n+1))).
a(p) = a(p-1) + A007663(n)*A330719(p-1) for p = prime(n) > 2.
a(n) = numerator(-(2^(n+1)*LerchPhi(2,1,n+1) + Pi*i + 2*HarmonicNumber(n))). - G. C. Greubel, Dec 28 2019
a(n) = numerator(A279683(n)/n!) for n > 0. - Amiram Eldar and Thomas Ordowski, Jan 15 2020
For n > 1, a(n) = A000265(A290347(n)). - Thomas Ordowski, Mar 29 2025

A198245 Euler primes: Primes p that divide E(p - 3), where E(k) is the k-th Euler number.

Original entry on oeis.org

149, 241, 2946901, 16467631, 17613227, 327784727, 426369739, 1062232319
Offset: 1

Views

Author

Romeo Mestrovic, Oct 22 2011

Keywords

Comments

Also called Vandiver primes. - N. J. A. Sloane, Sep 25 2023
See A196230 for another sequence of "Euler primes". - N. J. A. Sloane, May 29 2022
The even-indexed Euler numbers are A028296, the odd-indexed Euler numbers are all zero.
Numerous combinatorial congruences recently obtained by Z. W. Sun and by Z. H. Sun contain the Euler numbers E(p-3) with a prime p.
Only three primes less than 3 * 10^6 satisfy this condition (the current members of the sequence).
Such primes have been recently suggested by Z. W. Sun; namely, Sun found the first and the second such primes, 149 and 241, and used them to discover new congruences involving E(p - 3).
This is reported by Zhi Wei Sun on Feb 08 2010 and the third prime was found by Romeo Mestrovic (on Sep 26 2011).
Mestrovic (2012) computes that only three primes < 10^7 are in the sequence, but he conjectures that the sequence is infinite. - Jonathan Sondow, Dec 18 2012
If it exists, a(9) > 2 * 10^9. - Hiroaki Yamanouchi, Aug 06 2017
Hathi et al. give a(3) as 2124679 and claim that the terms 2124679, 16467631, 17613227 were reported in Cosgrave, Dilcher, 2013, but 2124679 does not appear in table 2 in that paper. How is 2124679 related to this sequence? Note that 2124679 is the second Wolstenholme prime (A088164). - Felix Fröhlich, Apr 27 2021

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 18.8.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2, 200]], IntegerQ[EulerE[# - 3]/#] &] (* Alonso del Arte, Oct 31 2011 *)

Extensions

a(4)-a(8) from Hiroaki Yamanouchi, Aug 06 2017

A246134 Binomial(2n, n) - 2 mod n^4.

Original entry on oeis.org

0, 4, 18, 68, 250, 922, 1029, 580, 2691, 4754, 2662, 8474, 4394, 10294, 2518, 49732, 29478, 65074, 123462, 128818, 6535, 93174, 36501, 12058, 187750, 162582, 297936, 273782, 536558, 741422, 59582, 16964, 118477, 540434, 132305, 136130, 1114366, 1138598, 2214594, 2381618, 1860867, 2795686, 1828661, 1775622, 2683618, 1435710, 1557345, 3882778
Offset: 1

Views

Author

Stanislav Sykora, Aug 16 2014

Keywords

Comments

For e > 3, unlike the cases e=1,2,3, the numbers binomial(2n, n) - 2 mod n^e are not necessarily 0 for any n>1, be it prime or composite (see A246130 for introductory comments). Testing up to n=278000, the only number n>1 for which a(n)=0 is the first Wolstenholme prime 16843 (A088164), but no composite.

Examples

			a(7) = (binomial(14,7)-2) mod 7^4 = (3432-2) mod 2401 = 1029.
		

Crossrefs

Cf. A000984, A088164, A246130 (e=1), A246132 (e=2), A246133 (e=3).

Programs

  • PARI
    a(n) = (binomial(2*n,n)-2)%n^4
Showing 1-10 of 32 results. Next