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.

Previous Showing 41-50 of 77 results. Next

A135127 Numbers such that the digital sums in bases 2, 3, 5 and 7 all are equal.

Original entry on oeis.org

0, 1, 882, 883, 1386, 1387, 2502, 2503, 3453, 7555, 7652, 7665, 7931, 9751, 10101, 12250, 12251, 16893, 17010, 17011, 17515, 17550, 17551, 18285, 20301, 22050, 22051, 24406, 24407, 25053, 27503, 31654, 40930, 40931, 41951, 50878, 50879
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007

Keywords

Examples

			a(2)=882, since ds_2(882 )=ds_3(882 )=ds_5(882 )=ds_7(882 )=6, where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 32000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 3]] == Total[IntegerDigits[#, 5]] == Total[IntegerDigits[#, 7]] &] (* G. C. Greubel, Sep 27 2016 *)
    Select[Range[0,51000],Length[Union[Total/@IntegerDigits[#,{2,3,5,7}]]] == 1&] (* Harvey P. Dale, Sep 18 2019 *)

Extensions

Added 0, Stanislav Sykora, May 06 2012

A133907 Least prime number p such that binomial(n+p, p) mod p = 1.

Original entry on oeis.org

2, 3, 5, 2, 2, 7, 11, 2, 2, 3, 3, 2, 2, 17, 17, 2, 2, 3, 3, 2, 2, 23, 29, 2, 2, 5, 3, 2, 2, 31, 37, 2, 2, 37, 37, 2, 2, 3, 41, 2, 2, 43, 47, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 59, 61, 2, 2, 67, 3, 2, 2, 67, 71, 2, 2, 71, 73, 2, 2, 3, 5, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 89, 89, 2, 2, 3, 3, 2, 2, 97
Offset: 1

Views

Author

Hieronymus Fischer, Oct 20 2007

Keywords

Comments

Also the least prime number p such that p divides floor(n/p) or p > n.
a(n) = 2 if and only if n is in A042948. - Robert Israel, May 11 2017
Conjecture: a(n) is the smallest prime p such that Sum_{k=1..n} k^(p-1) == n (mod p). Thus a(n) >= A317358(n). - Thomas Ordowski, Jul 29 2018

Examples

			a(2)=3, since binomial(2+3,3) mod 3 = 10 mod 3 = 1 and 3 is the minimal prime number with this property.
a(7)=11 because of binomial(7+11, 11) = 31824 = 2893*11 + 1, but binomial(7+k, k) mod k <> 1 for all primes < 11.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m;
      m:= 2:
      while floor(n/m) mod m <> 0 do m:= nextprime(m) od:
      m
    end proc:
    map(f, [$1..100]); # Robert Israel, May 11 2017
  • Mathematica
    a[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[Mod[Binomial[n+p, p], p] == 1, Return[p]]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 05 2023 *)
  • PARI
    a(n) = my(p=2); while (binomial(n+p, p) % p != 1, p = nextprime(p+1)); p; \\ Michel Marcus, Dec 17 2022
    
  • Python
    from sympy import nextprime, ff
    def A133907(n):
        p, m = 2, (n+2)*(n+1)>>1
        while m%p != 1:
            q = nextprime(p)
            m = m*ff(n+q,q-p)//ff(q,q-p)
            p = q
        return p # Chai Wah Wu, Feb 22 2023

A133624 Binomial(n+p, n) mod n, where p=4.

Original entry on oeis.org

0, 1, 2, 2, 1, 0, 1, 7, 4, 1, 1, 8, 1, 8, 6, 13, 1, 7, 1, 6, 8, 12, 1, 3, 1, 1, 10, 8, 1, 26, 1, 25, 12, 1, 1, 22, 1, 20, 14, 31, 1, 15, 1, 12, 16, 24, 1, 5, 1, 1, 18, 14, 1, 46, 1, 43, 20, 1, 1, 36, 1, 32, 22, 49, 1, 23, 1, 18, 24, 36, 1, 7, 1, 1, 26, 20, 1, 66, 1, 61, 28, 1, 1, 50, 1, 44, 30
Offset: 1

Views

Author

Hieronymus Fischer, Sep 30 2007

Keywords

Comments

Let d(m)...d(2)d(1)d(0) be the base-n representation of n+p. The relation a(n)=d(1) holds, if n is a prime index. For this reason there are infinitely many terms which are equal to 1.

Crossrefs

Programs

  • Magma
    [Binomial(n+4,4) mod n: n in [1..100]]; // Vincenzo Librandi, Apr 27 2014
  • Mathematica
    Table[Mod[Binomial[n+4,n],n],{n,90}] (* Harvey P. Dale, Apr 26 2014 *)

Formula

a(n) = binomial(n+4,4) mod n.
a(n)=1 if n is a prime > 4, since binomial(n+4,n) == (1+floor(4/n))(mod n), provided n is a prime.
From Chai Wah Wu, May 26 2016: (Start)
a(n) = (n^4 + 10*n^3 + 11*n^2 + 2*n + 24)/24 mod n.
For n > 6:
if n mod 24 == 0, then a(n) = n/12 + 1.
if n mod 24 is in {1, 2, 5, 7, 10, 11, 13, 17, 19, 23}, then a(n) = 1.
if n mod 24 is in {3, 9, 15, 18, 21}, then a(n) = n/3 + 1.
if n mod 24 is in {4, 20}, then a(n) = n/4 + 1.
if n mod 24 == 6, then a(n) = 5*n/6 + 1.
if n mod 24 is in {8, 16}, then a(n) = 3*n/4 + 1.
if n mod 24 == 12, then a(n) = 7*n/12 + 1.
if n mod 24 is in {14, 22}, then a(n) = n/2 + 1.
(End)
For n > 54, a(n) = 2*a(n-24) - a(n-48). - Ray Chandler, Apr 23 2023

A133876 n modulo 6 repeated 6 times.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 0, 0, 0
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length 6^2=36.

Crossrefs

Programs

  • Mathematica
    Table[PadRight[{},6,Mod[n,6]],{n,20}]//Flatten (* Harvey P. Dale, Nov 15 2023 *)

Formula

a(n)=(1+floor(n/6)) mod 6.
a(n)=1+floor(n/6)-6*floor((n+6)/36).
a(n)=(((n+6) mod 36)-(n mod 6))/6.
a(n)=((n+6-(n mod 6))/6) mod 6.
G.f. g(x)=(1-x^6)(1+2x^5+3x^12+4x^18+5x^24)/((1-x)(1-x^36)).
G.f. g(x)=(5x^36-6x^30+1)/((1-x)(1-x^6)(1-x^36)).

A133877 n modulo 7 repeated 7 times.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length 7^2=49.

Crossrefs

Formula

a(n)=(1+floor(n/7)) mod 7.
a(n)=1+floor(n/7)-7*floor((n+7)/49).
a(n)=(((n+7) mod 49)-(n mod 7))/7.
a(n)=((n+7-(n mod 7))/7) mod 7.
a(n)=binomial(n+7,n) mod 7 =binomial(n+7,7) mod 7.
G.f. g(x)=(1-x^7)(1+2x^7+3x^14+4x^21+5x^28+6x^35)/((1-x)(1-x^49)).
G.f. g(x)=(6x^49-7x^42+1)/((1-x)(1-x^7)(1-x^49)).

A133887 Binomial(n+7,n) mod 7^2.

Original entry on oeis.org

1, 8, 36, 22, 36, 8, 1, 2, 16, 23, 44, 23, 16, 2, 3, 24, 10, 17, 10, 24, 3, 4, 32, 46, 39, 46, 32, 4, 5, 40, 33, 12, 33, 40, 5, 6, 48, 20, 34, 20, 48, 6, 7, 7, 7, 7, 7, 7, 7, 8, 15, 43, 29, 43, 15, 8, 9, 23, 30, 2, 30, 23, 9, 10, 31, 17, 24, 17, 31, 10, 11, 39, 4, 46, 4, 39, 11, 12, 47
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length 7^3=343.

Crossrefs

For the sequence regarding binomial(n+7, n) mod 7 see A133877.

Programs

  • Mathematica
    Table[Mod[Binomial[n+7,n],49],{n,0,80}] (* Harvey P. Dale, Apr 08 2018 *)

Formula

a(n)=binomial(n+7,7) mod 7^2.
G.f. g(x)=sum{0<=k<343, a(k)*x^k}/(1-x^343).

A133888 Binomial(n+8,n) mod 8.

Original entry on oeis.org

1, 1, 5, 5, 7, 7, 3, 3, 6, 6, 6, 6, 2, 2, 2, 2, 7, 7, 3, 3, 1, 1, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 1, 1, 3, 3, 7, 7, 2, 2, 2, 2, 6, 6, 6, 6, 3, 3, 7, 7, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 7, 7, 3, 3, 6, 6, 6, 6, 2, 2, 2, 2, 7, 7, 3, 3, 1, 1, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 1, 1, 3, 3, 7, 7, 2
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length 8^2=64.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Binomial[n+8,n],8],{n,0,110}] (* Harvey P. Dale, Aug 08 2011 *)

Formula

a(n)=binomial(n+8,8) mod 8.

A133889 a(n) = binomial(n+9,n) mod 9.

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 1, 1, 1, 2, 2, 2, 8, 8, 8, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 7, 7, 7, 4, 4, 4, 5, 5, 5, 2, 2, 2, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 1, 1, 1, 7, 7, 7, 8, 8, 8, 5, 5, 5, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 4, 4, 4, 1, 1, 1, 2, 2, 2, 8, 8, 8, 2, 2, 2, 3, 3, 3, 3, 3, 3
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length 9^2 = 81.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Binomial[n+9,n],9],{n,0,110}] (* Harvey P. Dale, Jan 14 2012 *)

Formula

a(n) = binomial(n+9,9) mod 9.

A135122 Numbers such that the digital sum base 2 and the digital sum base 3 and the digital sum base 4 all are equal.

Original entry on oeis.org

1, 21, 261, 273, 17748, 17749, 20820, 20821, 65620, 65621, 70740, 70741, 83268, 83269, 86292, 86293, 1066068, 1066069, 1070420, 1135701, 1135893, 1135953, 5326161, 5330001, 5330241, 5330260, 5330261, 5506389, 5525829, 5526801, 5571909, 5574933, 5592321
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007

Keywords

Examples

			a(2)=21, since ds_2(21)=ds_3(21)=ds_10(21)=3, where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5600000],Length[Union[Table[Total[IntegerDigits[#,n]],{n,2,4}]]]==1&] (* Harvey P. Dale, Aug 14 2013 *)
  • PARI
    isok(n) = my(sd2=sumdigits(n, 2)); (sd2==sumdigits(n, 3)) && (sd2==sumdigits(n, 4)); \\ Michel Marcus, Aug 08 2018

Extensions

a(31)-a(33) from Giovanni Resta, Aug 06 2018

A133878 n modulo 8 repeated 8 times.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length 8^2=64.

Crossrefs

Programs

  • Mathematica
    Flatten[Join[Table[PadRight[{},8,n],{n,7}],Table[PadRight[{},8,n],{n,0,7}]]] (* Harvey P. Dale, Nov 06 2011 *)

Formula

a(n)=(1+floor(n/8)) mod 8.
a(n)=1+floor(n/8)-8*floor((n+8)/64).
a(n)=(((n+8) mod 64)-(n mod 8))/8.
a(n)=((n+8-(n mod 8))/8) mod 8.
G.f. g(x)=(1-x^8)(1+2x^8+3x^16+4x^24+5x^32+6x^40+7x^48)/((1-x)(1-x^64)).
G.f. g(x)=(1-x^8)*sum{0<=k<7, (k+1)*x^(8*k)}/((1-x)(1-x^64)).
G.f. g(x)=(7x^64-8x^56+1)/((1-x)(1-x^8)(1-x^64)).
Previous Showing 41-50 of 77 results. Next