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.

A030979 Numbers k such that binomial(2k,k) is not divisible by 3, 5 or 7.

Original entry on oeis.org

0, 1, 10, 756, 757, 3160, 3186, 3187, 3250, 7560, 7561, 7651, 20007, 59548377, 59548401, 45773612811, 45775397187, 237617431723407, 24991943420078301, 24991943420078302, 24991943420078307, 24991943715007536, 24991943715007537
Offset: 1

Views

Author

Shawn Godin (sgodin(AT)onlink.net)

Keywords

Comments

By Lucas's theorem, binomial(2k,k) is not divisible by a prime p iff all base-p digits of k are smaller than p/2.
Ronald L. Graham offered $1000 to the first person who could settle the question of whether this sequence is finite or infinite. He remarked that heuristic arguments show that it should be infinite, but finite if it is required that binomial(2k,k) is prime to 3, 5, 7 and 11, with k = 3160 probably the last k which has this property.
The Erdős et al. paper shows that for any two odd primes p and q there are an infinite number of k for which gcd(p*q,binomial(2k,k))=1; i.e., p and q do not divide binomial(2k,k). The paper does not deal with the case of three primes. - T. D. Noe, Apr 18 2007
Pomerance gives a heuristic suggesting that there are on the order of x^0.02595... terms up to x. - Charles R Greathouse IV, Oct 09 2015

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section B33.

Crossrefs

Programs

  • Mathematica
    lim=10000; Intersection[Table[FromDigits[IntegerDigits[k,2],3], {k,0,lim}], Table[FromDigits[IntegerDigits[k,3],5], {k,0,lim}], Table[FromDigits[IntegerDigits[k,4],7], {k,0,lim}]] (* T. D. Noe, Apr 18 2007 *)
  • PARI
    fval(n,p)=my(s);while(n\=p,s+=n);s
    is(n)=fval(2*n,3)==2*fval(n,3) && fval(2*n,5)==2*fval(n,5) && fval(2*n,7)==2*fval(n,7) \\ Charles R Greathouse IV, Oct 09 2015

Formula

Intersection of A005836, A037453 and A037461. - T. D. Noe, Apr 18 2007

Extensions

More terms from Naohiro Nomoto, May 06 2002
Additional comments from R. L. Graham, Apr 25 2007
Additional comments and terms up 3^41 in b-file from Max Alekseyev, Nov 23 2008
Additional terms up to 10^70 in b-file from Christopher E. Thompson, Nov 06 2015

A129508 Numbers k such that 3 and 5 do not divide binomial(2*k, k).

Original entry on oeis.org

0, 1, 10, 12, 27, 30, 31, 36, 37, 252, 255, 256, 280, 282, 756, 757, 760, 810, 811, 3160, 3162, 3186, 3187, 3250, 3252, 3276, 3277, 3280, 6561, 6562, 6885, 6886, 6912, 6925, 7536, 7537, 7560, 7561, 7626, 7627, 7650, 7651, 19686, 19687, 20007, 20010, 20011
Offset: 1

Views

Author

T. D. Noe, Apr 18 2007

Keywords

Comments

The Erdos paper proves that for any two odd primes p and q, there are an infinite number of k for which gcd(p*q, binomial(2*k, k)) = 1; i.e., p and q do not divide binomial(2*k, k).

Crossrefs

Cf. A030979 (k such that 3, 5 and 7 do not divide binomial(2*k, k)).

Programs

  • Mathematica
    lim=10000; Intersection[Table[FromDigits[IntegerDigits[k,2],3], {k,0,lim}], Table[FromDigits[IntegerDigits[k,3],5], {k,0,lim}]]
  • PARI
    valp(n, p)=my(s); while(n\=p, s+=n); s
    is(n)=valp(2*n, 3)==2*valp(n, 3) && valp(2*n, 5)==2*valp(n, 5) \\ Charles R Greathouse IV, Feb 03 2016

Formula

Intersection of A005836 and A037453.

A050607 Numbers k such that base 5 expansion matches (0|1|2)*((0|1)(3|4))?(0|1|2)*.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 42, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 75, 76, 77, 80, 81, 82, 85, 86, 87, 100, 101, 102, 105, 106, 107, 110, 111, 112, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 140, 141, 142, 145
Offset: 1

Views

Author

Antti Karttunen, Oct 24 1999

Keywords

Comments

25 does not divide C(2s-1,s) = A001700(s) (nor C(2s,s) = A000984(s), central column of Pascal's triangle) if and only if s is one of the terms in this sequence.

Crossrefs

Programs

  • Perl
    sub conv_x_base_n { my($x,$b) = @_; my ($r,$z) = (0,'');
    do { $r = $x % $b; $x = ($x - $r)/$b; $z = "$r" . $z; } while(0 != $x);
    return($z); }
    for($i=0; $i <= 201; $i++) { if(("0" . conv_x_base_n($i,5)) =~ /^(0|1|2)*((0|1)(3|4))?(0|1|2)*$/) { print $i, ","; } }

Extensions

a(1)=0 inserted by Georg Fischer, Jun 26 2021

A268082 Numbers n such that gcd(binomial(2*n-1,n), n) is equal to 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 39, 41, 43, 47, 49, 53, 55, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 93, 97, 101, 103, 107, 109, 111, 113, 119, 121, 125, 127, 128, 131, 137, 139, 149, 151, 155, 157, 161, 163, 167, 169, 173, 179
Offset: 1

Views

Author

Michel Marcus, Jan 26 2016

Keywords

Comments

Or numbers n such that A088218(n) is coprime to n.
The power of primes (A000961) are terms of this sequence.
From Robert Israel, Jan 26 2016: (Start)
By Lucas's theorem, these are the n such that for every prime p dividing n, no base-p digit of n is greater than the corresponding base-p digit of 2n-1. Equivalently (Kummer's theorem), there are no carries in base-p addition of n and n-1. Thus if p is odd, each base-p digit of n is less than p/2.
The only even terms are powers of 2.
All terms divisible by 3 are in A005836, and all terms divisible by 5 are in A037453. (End)
A082916 (after 0) lists the odd terms of this sequence. - Bruno Berselli, Jan 26 2015

Examples

			For n=3, binomial(2*n-1, n) = binomial(5, 3) = 10 and 10 is coprime to 3, so 3 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..200] | Gcd(Binomial(2*n-1,n), n) eq 1]; // Vincenzo Librandi, Jan 26 2016
  • Maple
    filter:= proc(n) local F,p;
    if n::even then evalb(n = 2^padic:-ordp(n,2))
    else
       F:= numtheory:-factorset(n);
       for p in F do
         if max(convert(n,base,p)) > p/2 then return false fi;
       od;
       true
    fi
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 26 2016
  • Mathematica
    Select[Range@ 180, GCD[Binomial[2 # - 1, #], #] == 1 &] (* Michael De Vlieger, Jan 26 2016 *)
  • PARI
    isok(n) = gcd(binomial(2*n-1,n), n) == 1;
    
  • PARI
    lista(nn) = for(n=1, nn, if(gcd(binomial(2*n-1, n), n) == 1, print1(n, ", "))); \\ Altug Alkan, Jan 26 2016
    

A073094 Final digit of C(2k,k) when not equal to zero.

Original entry on oeis.org

2, 6, 2, 4, 2, 6, 2, 6, 2, 4, 2, 4, 8, 4, 2, 4, 2, 6, 2, 6, 2, 4, 2, 6, 2, 6, 2, 4, 2, 4, 8, 4, 2, 4, 2, 4, 8, 4, 8, 6, 8, 4, 8, 4, 2, 4, 2, 4, 8, 4, 2, 4, 2, 6, 2, 6, 2, 4, 2, 6, 2, 6, 2, 4, 2, 4, 8, 4, 2, 4, 2, 6, 2, 6, 2, 4, 2, 6, 2, 6, 2, 4, 2, 4, 8, 4, 2, 4, 2, 4, 8, 4, 8, 6, 8, 4, 8, 4, 2, 4, 2, 4, 8, 4, 2
Offset: 1

Views

Author

Benoit Cloitre, Aug 18 2002

Keywords

Comments

Sequence contains 2,4,6,8, only.

Programs

  • Maple
    f:= proc(n) local L,r;
      L:= convert(n,base,3);
      r:= 2 &^ numboccur(1,L) mod 5;
      r + 5*(r mod 2)
    end proc:
    map(f, [$1..200]); # Robert Israel, Jun 11 2018
  • Mathematica
    Mod[#,10]&/@Table[Binomial[2n,n],{n,800}]/.(0->Nothing) (* Harvey P. Dale, Apr 14 2018 *)

Formula

a(n) = C(2*A037453(n), A037453) reduced modulo 10.

A218394 Numbers such that sum(i<=n) binomial(n,i)*binomial(2*n-2*i, n-i) is not divisible by 5.

Original entry on oeis.org

1, 5, 7, 11, 25, 27, 31, 35, 37, 51, 55, 57, 61, 125, 127, 131, 135, 137, 151, 155, 157, 161, 175, 177, 181, 185, 187, 251, 255, 257, 261, 275, 277, 281, 285, 287, 301, 305, 307, 311, 625, 627, 631, 635, 637, 651, 655, 657, 661, 675, 677, 681, 685, 687, 751
Offset: 1

Views

Author

Michel Marcus, Oct 28 2012

Keywords

Comments

a(n) = A037453(2*n-1) (proved by Schur, see link).

Crossrefs

Cf. A037453.

Programs

  • PARI
    lista(nb) = {for (n=1, nb, if (sum(i=1,n, binomial(n, i)*binomial(2*n-2*i,n-i)) % 5 != 0, print1(n, ", ")););}
    
  • PARI
    a(n) = {2*n-1+2*sum(i=1,n, 5^(i-1)*floor((2*n-1)/3^i))}
    
  • Python
    from gmpy2 import digits
    def A218394(n): return int(digits((n<<1)-1,3),5) # Chai Wah Wu, Aug 10 2025

Formula

a(n) = 2*n - 1 + 2*sum{i=1,n} 5^(i-1)*floor((2*n-1)/3^i).

A261691 Change of base from fractional base 3/2 to base 3.

Original entry on oeis.org

0, 1, 2, 6, 7, 8, 21, 22, 23, 63, 64, 65, 69, 70, 71, 192, 193, 194, 207, 208, 209, 213, 214, 215, 579, 580, 581, 621, 622, 623, 627, 628, 629, 642, 643, 644, 1737, 1738, 1739, 1743, 1744, 1745, 1866, 1867, 1868, 1881, 1882, 1883, 1887, 1888, 1889, 1929, 1930
Offset: 0

Views

Author

Tom Edgar, Aug 28 2015

Keywords

Comments

To obtain a(n), we interpret A024629(n) as a base 3 representation (instead of base 3/2). More precisely, if A024629(n) = A007089(m), then a(n) = m.
The digits used in fractional base 3/2 are 0, 1, and 2, which are the same as the digits used in base 3.

Examples

			The base 3/2 representation of 7 is (2,1,1); i.e., 7 = 2*(3/2)^2 + 1*(3/2) + 1. Since 2*(3^2) + 1*3 + 1*1 = 22, we have a(7) = 22.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, 3 * a[2 * Floor[n/3]] + Mod[n, 3]]; Array[a, 100, 0] (* Amiram Eldar, Aug 04 2025 *)
  • PARI
    a(n) = { my (v=0, t=1); while (n, v+=t*(n%3); n=(n\3)*2; t*=3); v } \\ Rémy Sigrist, Apr 06 2021
  • Sage
    def changebase(n):
        L=[n]
        i=1
        while L[i-1]>2:
            x=L[i-1]
            L[i-1]=x.mod(3)
            L.append(2*floor(x/3))
            i+=1
        return sum([L[i]*3^i for i in [0..len(L)-1]])
    [changebase(n) for n in [0..100]]
    

Formula

For n = Sum_{i=0..m} c_i*(3/2)^i with each c_i in {0,1,2}, a(n) = Sum_{i=0..m} c_i*3^i.
From Rémy Sigrist, Apr 06 2021: (Start)
Apparently:
- a(3*n) = a(3*n-1) + A003462(1+A087088(n)) for any n > 0,
- a(3*n+1) = a(3*n) + 1 for any n >= 0,
- a(3*n+2) = a(3*n+1) + 1 for any n >= 0,
(End)
Showing 1-7 of 7 results.