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

A228562 Composite numbers k that are not prime powers such that binomial(2k-1, k-1) is congruent to 1 (mod k).

Original entry on oeis.org

27173, 2001341, 16024189487
Offset: 1

Views

Author

Felix Fröhlich, Aug 25 2013

Keywords

Crossrefs

The odd terms of A328497.

Programs

  • Mathematica
    Select[Range[30000], PrimeNu[#] > 1 && Mod[Binomial[2# - 1, # - 1], #] == 1 &] (* Alonso del Arte, May 11 2014 *)
  • PARI
    N=10^9; for(n=2, N, if(Mod(binomial(2*n-1, n-1), n)==1 && !ispower(n) && !isprime(n), print1(n, ", "))); \\ Felix Fröhlich, May 11 2014
    
  • PARI
    vp(n,p)=my(s); while(n\=p, s+=n); s
    is(n)=my(f=factor(n)[,1],G); if(#f==1, return(0)); for(i=1,#f, if(vp(2*n-1,f[i]) > vp(n,f[i])+vp(n-1,f[i]), return(0))); G=prod(i=1,#f,f[i]^(log(n)\log(f[i]))); prod(i=n+1,2*n-1, i/gcd(i,G), Mod(1,n))/prod(i=2,n-1, i/gcd(i,G), Mod(1,n))==1
    forcomposite(n=4,1e9, if(is(n), print1(n", "))) \\ Charles R Greathouse IV, May 12 2014

Formula

A099905(a(n)) = 1. - Jonathan Sondow, Jan 24 2016

A099906 a(n) = binomial(2n-1,n-1) mod n^2.

Original entry on oeis.org

0, 3, 1, 3, 1, 30, 1, 35, 10, 78, 1, 62, 1, 52, 135, 35, 1, 138, 1, 10, 402, 124, 1, 270, 126, 172, 253, 476, 1, 812, 1, 291, 978, 870, 616, 674, 1, 364, 10, 410, 1, 756, 1, 1124, 1260, 532, 1, 1422, 1716, 1128, 2322, 1556, 1, 1920, 1941, 2172, 1815, 844, 1, 3528, 1, 964
Offset: 1

Views

Author

Henry Bottomley, Oct 29 2004

Keywords

Comments

For odd primes p, Charles Babbage showed in 1819 that a(p) = 1.

Examples

			a(11) = binomial(21,10) mod 11^2 = 352716 mod 121 = 1.
		

Crossrefs

Programs

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

A099907 a(n) = C(2n-1,n-1) mod n^3.

Original entry on oeis.org

0, 3, 10, 35, 1, 30, 1, 291, 253, 378, 1, 782, 1, 2404, 1260, 291, 1, 3378, 1, 410, 7899, 3996, 1, 6030, 126, 10988, 11188, 5180, 1, 19712, 1, 8483, 5334, 34394, 1841, 21410, 1, 20580, 39556, 38810, 1, 64260, 1, 35972, 66060, 36504, 1, 61326, 1716, 123628
Offset: 1

Views

Author

Henry Bottomley, Oct 29 2004

Keywords

Comments

For p prime > 3, Joseph Wolstenholme showed in 1862 that a(p)=1. - corrected by Jonathan Sondow, Jan 24 2016

Examples

			a(11) = 352716 mod 1331 = 1.
		

Crossrefs

Programs

  • Magma
    [Binomial(2*n-1, n-1) mod n^3: n in [1..50]]; // Vincenzo Librandi, Jan 24 2016
  • Maple
    seq(binomial(2*n-1,n-1) mod n^3, n=1..100); # Robert Israel, Jan 24 2016
  • Mathematica
    Table[Mod[Binomial[2 n - 1, n - 1], n^3], {n, 1, 50}] (* Vincenzo Librandi, Jan 24 2016 *)
  • PARI
    a(n) = binomial(2*n-1, n-1) % n^3; \\ Michel Marcus, Jan 24 2016
    

A136327 Numbers k > 1 such that binomial(2k-1, k-1) == 1 (mod k).

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251
Offset: 1

Views

Author

Franz Vrabec, Mar 26 2008

Keywords

Comments

k such that A099905(k) = 1.
Contains primes, squares of odd primes and cubes of primes >= 5.
See A228562 for terms that are neither primes nor prime powers. [Joerg Arndt, Aug 27 2013]

Examples

			a(3) = 5 because binomial(9, 4) = 126 == 1 (mod 5).
		

Crossrefs

Cf. A099905.

Programs

  • Maple
    filter:= k -> binomial(2*k-1,k-1) mod k = 1:
    select(filter, [$1..1000]); # Robert Israel, Feb 11 2025
  • Mathematica
    Select[Range[300], Mod[Binomial[2# - 1, # - 1], #] == 1 &] (* Alonso del Arte, May 11 2014 *)
  • PARI
    isok(n) = (binomial(2*n-1, n-1) % n) == 1; \\ Michel Marcus, Aug 26 2013

Extensions

Name corrected by Robert Israel, Feb 11 2025

A267824 Composite numbers n such that binomial(2n-1, n-1) == 1 (mod n^2).

Original entry on oeis.org

283686649, 4514260853041
Offset: 1

Views

Author

Jonathan Sondow, Jan 25 2016

Keywords

Comments

Babbage proved the congruence holds if n > 2 is prime.
See A088164 and A263882 for references, links, and additional comments.
Conjecture: n is a term if and only if n = A088164(i)^2 for some i >= 1 (cf. McIntosh, 1995, p. 385). - Felix Fröhlich, Jan 27 2016
The "if" part of the conjecture is true: see the McIntosh reference. - Jonathan Sondow, Jan 28 2016
The above conjecture implies that this sequence and A228562 are disjoint. - Felix Fröhlich, Jan 27 2016
Composites c such that A281302(c) > 1. - Felix Fröhlich, Feb 21 2018

Examples

			a(1) = 16843^2 and a(2) = 2124679^2 are squares of Wolstenholme primes A088164.
		

Crossrefs

A242473 Binomial(2p-1,p-1) modulo p^4, with p=prime(n).

Original entry on oeis.org

3, 10, 126, 1716, 1332, 2198, 14740, 61732, 158172, 268280, 29792, 557184, 2343315, 2623732, 3218514, 5657327, 11911983, 12710937, 7218313, 12526886, 24119055, 18735483, 13151102, 19034164, 87616609, 86545285, 2185455, 80852839, 137273075, 106774379, 20483831, 69690822, 20570825
Offset: 1

Views

Author

Felix Fröhlich, May 26 2014

Keywords

Comments

A value of 1 indicates a Wolstenholme prime.

Crossrefs

Cf. A088164, A099905, A099906, A099907. Subsequence of A099908.

Programs

  • Mathematica
    Table[Mod[Binomial[2p-1,p-1],p^4],{p,Prime[Range[30]]}] (* Harvey P. Dale, Jun 26 2017 *)
  • PARI
    forprime(n=2, 10^2, m=(binomial(2*n-1, n-1)%n^4); print1(m, ", "));
    
  • Python
    from _future_ import division
    from sympy import isprime
    A242473_list, b = [], 1
    for n in range(1,10**4):
        if isprime(n):
            A242473_list.append(b % n**4)
        b = b*2*(2*n+1)//(n+1) # Chai Wah Wu, Jan 26 2016
    
  • Python
    from sympy import Mod, binomial, prime
    def A242473(n): return int(Mod(binomial(2*(p:=prime(n))-1,p-1,evaluate=False),p**4)) # Chai Wah Wu, Apr 24 2025

A383505 Least integer k >= 0 such that binomial(k*n,k+1) = -1 mod n, or -1 if no such integer exists.

Original entry on oeis.org

0, 1, 2, 3, 4, 341, 6, 79, 8, 19599, 10, 3937027727, 12, 2841, 22679, 47, 16, 18459448019, 18, 179, 146, 4003647, 22, 77934182399, 24, 299519, 80, 29952579, 28
Offset: 1

Views

Author

Jason Bard, May 05 2025

Keywords

Comments

Conjecture: a(A000430(n)) = A000430(n)-1.
It is not hard to see that conjecture is true. - Max Alekseyev, Jul 24 2025
Other values calculated: a(32) = 1343, a(34) = 1121, a(38) = 417.
If exists, a(30) > 10^13. - Max Alekseyev, Jul 24 2025

Examples

			a(6) = 341 because binomial(341*6, 341+1) = 5 mod 6, and no smaller nonnegative integer satisfies this.
		

Crossrefs

Programs

  • Mathematica
    f = {}; Do[k = 0; While[! Mod[Binomial[k*n, k + 1], n] == n - 1, k++]; f = Join[f, {k}], {n, 1, 11}]
  • PARI
    a(n) = my(k=0); while (binomod(k*n,k+1, n) != Mod(-1, n), k++); k; \\ Michel Marcus, May 10 2025

Formula

If p is prime, then a(p) = p-1 by Lucas' theorem. - Chai Wah Wu, Jul 21 2025

Extensions

a(12) from Chai Wah Wu, Jul 21 2025
a(18), a(22), a(24), a(26), a(28) from Max Alekseyev, Jul 24 2025
Showing 1-8 of 8 results.