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 35 results. Next

A133900 a(n) = period of the sequence {b(m), m>=0}, defined by b(m):=binomial(m+n,n) mod n.

Original entry on oeis.org

1, 4, 9, 16, 25, 72, 49, 64, 81, 400, 121, 864, 169, 784, 675, 256, 289, 2592, 361, 1600, 1323, 3872, 529, 3456, 625, 5408, 729, 3136, 841, 324000, 961, 1024, 9801, 18496, 6125, 31104, 1369, 23104, 13689, 32000, 1681, 254016, 1849, 15488, 30375, 33856
Offset: 1

Views

Author

Hieronymus Fischer, Oct 15 2007, Oct 20 2007

Keywords

Comments

This is the analog of the sequence of Pisano periods (A001175) for binomial factors.
n^2 always divides a(n).
A prime p is a factor of a(n) if and only if it is a factor of n (i.e., a(n) and n have the same prime factors).

Examples

			a(3)=9 since binomial(m+3,3) mod 3, m>=0, is periodic with period length 3^2=9 (see A133883).
a(6)=72 since binomial(m+6,6) mod 6, m>=0, is periodic with period length 4*6^2=72 (see A133886).
		

Crossrefs

Formula

a(n)=n^2 if n is a prime or a power of a prime.

A133620 Binomial(n+p,n) mod n where p=10.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 2, 6, 2, 6, 1, 2, 1, 10, 5, 7, 1, 12, 1, 15, 18, 12, 1, 12, 21, 14, 4, 12, 1, 28, 1, 29, 1, 18, 6, 5, 1, 20, 14, 10, 1, 14, 1, 34, 15, 24, 1, 3, 8, 16, 18, 27, 1, 34, 23, 16, 1, 30, 1, 16, 1, 32, 17, 57, 40, 56, 1, 1, 47, 60, 1, 54, 1, 38, 36, 58, 12, 66, 1, 63, 10, 42, 1
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

  • Mathematica
    Table[Mod[Binomial[n + 10, n], n], {n, 90}] (* Harvey P. Dale, Apr 04 2015 *)
  • PARI
    a(n) = binomial(n+10, n) % n \\ Michel Marcus, Jul 15 2013

Formula

a(n) = binomial(n+p,p) mod n.
a(n) = 1 if n is a prime > p, since binomial(n+p,n)==(1+floor(p/n))(mod n), provided n is a prime.
a(n) = A001287(n+10) mod n. - Michel Marcus, Jul 15 2013; corrected by Michel Marcus, Jan 27 2020
For n > 58060802, a(n) = 2*a(n-29030400) - a(n-58060800). - Ray Chandler, Apr 29 2023

A133872 Period 4: repeat [1, 1, 0, 0].

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Partial sums of A056594.
Let i=sqrt(-1) and S(n) = Sum_{k=0..n-1} exp(2*Pi*i*k^2/n) for n>=1 the famous Gauss sum. Then S(n) = (a(n)+a(n+1)*i)*sqrt(n). - Franz Vrabec, Nov 08 2007
a(A042948(n)) = 1; a(A042964(n)) = 0. - Reinhard Zumkeller, Oct 03 2008
a(n) is also the real part of partial sum of powers of the complex unit i. - Enrique Pérez Herrero, Aug 16 2009
Periodic sequences having a period of 2k and composed of k ones followed by k zeros have a closed formula of floor(((n+k) mod 2k)/k). Listed sequences of this form are: k=1..A000035(n+1), k=2..A133872(n), k=3..A088911, k=4..A131078(n), k=5..A112713(n-1). - Gary Detlefs, May 17 2011
0.repeat(0,0,1,1) is 1/5 in base 2, due to 1/5 = (3/16)/(1-1/16). For the general case see 1/A062158(n) in base n >= 2. Here n = 2. - Wolfdieter Lang, Jun 20 2014
a(n) (for n>=1) is the determinant of the n X n Toeplitz matrix M satisfying: M(i,j)=1 if -1<=j-i<=2 and 0 otherwise. - Dmitry Efimov, Jun 23 2015
a(n) (for n>=1) is the difference between numbers of even and odd permutations p of 1,2,...,n such that -1 <= p(i)-i <= 2 for i=1,2,...,n. - Dmitry Efimov, Jan 08 2016
The binomial transform is 1, 2, 3, 4, 6, 12,... (see A038504). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 + x + x^4 + x^5 + x^8 + x^9 + x^12 + x^13 + x^16 + x^17 + x^20 + ...
		

Crossrefs

Programs

Formula

a(n) = (1 + floor(n/2)) mod 2.
a(n) = A004526(A000035(n+2)).
a(n) = 1 + floor(n/2) - 2*floor((n+2)/4).
a(n) = (((n+2) mod 4) - (n mod 2))/2.
a(n) = ((n + 2 - (n mod 2))/2) mod 2.
a(n) = ((2*n + 3 + (-1)^n)/4) mod 2.
a(n) = (1 + (-1)^((2*n - 1 + (-1)^n)/4))/2.
a(n) = binomial(n+2, n) mod 2 = binomial(n+2, 2) mod 2.
a(n) = A000217(n+1) mod 2.
G.f.: (1+x)/(1-x^4) = 1/((1-x)(1+x^2)).
a(n) = 1/2 + (1/2)*cos(Pi*n/2) + (1/2)*sin(Pi*n/2). a(n) = A021913(n+2). - R. J. Mathar, Nov 15 2007
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = 1/2 + sin((2n+1)Pi/4)/sqrt(2).
a(n) = 1/2 + cos((2n-1)Pi/4)/sqrt(2). (End)
a(n) = Re(Sum_{k=0..n} i^k), where i=sqrt(-1) and Re is the real part of a complex number. a(n) = (1/2)*((Sum_{k=0..n} i^k) + Sum_{k=0..n} i^-k) = Re((1/2)*(1 + i)*(1 - i^(n+1))). - Enrique Pérez Herrero, Aug 16 2009
a(n) = (1 + i^(n*(n-1)))/2, where i=sqrt(-1). - Bruno Berselli, May 18 2011
a(n) = (Sum_{k=1..n} k^j) mod 2, for any j. - Gary Detlefs, Dec 28 2011
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2. - Jean-Christophe Hervé, May 01 2013
a(n) = 1 - floor(n/2) + 2*floor(n/4) = 1 - A004526(n) + A122461(n). - Wesley Ivan Hurt, Dec 06 2013
a(n) = (1 + (-1)^floor(n/2))/2. - Wesley Ivan Hurt, Apr 17 2014
a(n) = A054925(n+2) - A011848(n+2). - Wesley Ivan Hurt, Jun 09 2014
Euler transform of length 4 sequence [1, -1, 0, 1]. - Michael Somos, Sep 26 2014
a(n) = a(1-n) for all n in Z. - Michael Somos, Sep 26 2014
From Ilya Gutkovskiy, Jul 09 2016: (Start)
Inverse binomial transform of A038504(n+1).
E.g.f.: (exp(x) + sin(x) + cos(x))/2. (End)
a(n) = (1 + (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Apr 04 2019

Extensions

Definition rewritten by N. J. A. Sloane, Apr 30 2009

A133890 Binomial(n+10,n) mod 10.

Original entry on oeis.org

1, 1, 6, 6, 1, 3, 8, 8, 8, 8, 6, 6, 6, 6, 6, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 6, 6, 6, 6, 6, 8, 8, 3, 3, 8, 6, 1, 1, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 6, 6, 1, 1, 6, 8, 8, 8, 8, 8, 6, 6, 6, 6, 1, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 3, 3, 8, 8, 3, 1, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 1, 1, 6, 6, 6
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length A133900(10)=4*10^2=400.

Crossrefs

Programs

Formula

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

A133630 Nonprime numbers k such that binomial(k+p,k) mod k = 1, where p=10.

Original entry on oeis.org

4, 33, 57, 68, 85, 87, 111, 121, 141, 143, 164, 169, 185, 187, 209, 219, 221, 235, 247, 249, 253, 260, 289, 292, 299, 303, 319, 323, 327, 335, 341, 356, 361, 377, 381, 388, 391, 403, 407, 411, 435, 437, 451, 452, 473, 481, 484, 485, 489, 493, 516, 517, 519
Offset: 1

Views

Author

Hieronymus Fischer, Sep 30 2007

Keywords

Crossrefs

Programs

A133880 n modulo p repeated p times (where p=10).

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length p^2=100.
a(n) = A179051(n) for n < 90. - Reinhard Zumkeller, Jun 27 2010

Crossrefs

Programs

Formula

The following formulas are given for a general parameter p (p=10 for this sequence).
a(n)=(1+floor(n/p)) mod p.
a(n)=1+floor(n/p)-p*floor((n+p)/p^2).
a(n)=(((n+p) mod p^2)-(n mod p))/p.
a(n)=((n+p-(n mod p))/p) mod p.
G.f. g(x)=((p-1)x^(p^2)-px^(p(p-1))+1)/((1-x)(1-x^p)(1-x^(p^2))).
G.f. g(x)=(1-x^p)*sum{0<=k<(p-1), (k+1)*x^(k*p)}/((1-x)(1-x^(p^2))).

A038509 Composite numbers congruent to +-1 mod 6.

Original entry on oeis.org

25, 35, 49, 55, 65, 77, 85, 91, 95, 115, 119, 121, 125, 133, 143, 145, 155, 161, 169, 175, 185, 187, 203, 205, 209, 215, 217, 221, 235, 245, 247, 253, 259, 265, 275, 287, 289, 295, 299, 301, 305, 319, 323, 325, 329, 335, 341, 343, 355, 361, 365, 371, 377, 385
Offset: 1

Views

Author

Keywords

Comments

Or, composite numbers with smallest prime factor >= 5.
Or, nonprime numbers n such that binomial(n+3, 3) mod n == 1. - Hieronymus Fischer, Sep 30 2007
Note that the primes > 3 are congruent to +-1 mod 6.
This sequence differs from A067793 (composite n such that phi(n) > 2n/3) starting at 385. Numbers in this sequence but not in A067793 are 385, 455, 595, 665, 805, 1015, 1085, 1925, 2275, 2695, etc. See A069043. - R. J. Mathar, Jun 08 2008 and Zak Seidov, Nov 02 2011
Intersection of A002808 and A007310. - Reinhard Zumkeller, Jun 30 2012
The product (24/25) * (36/35) * (48/49) * (54/55) * (66/65) * (78/77) * (84/85) * (90/91) * ... * ((6*k)/a(n)) * ... = Pi^2/(6*sqrt(3)), where 6*k is the nearest number to a(n), with k in A067611 but not in A002822. (See A258414.) - Dimitris Valianatos, Mar 27 2017

Crossrefs

Cf. A171993 (nonprimes of the form 3*k+-1).
Cf. A069043, A067793 (composite n such that phi(n) > 2n/3).

Programs

  • Haskell
    a038509 n = a038509_list !! (n-1)
    a038509_list = [x | x <- a002808_list, gcd x 6 == 1]
    -- Reinhard Zumkeller, Aug 05 2014, Jun 30 2012
    
  • Maple
    A038509 := proc(n)
        option remember;
        if n = 1 then
            25;
        else
            for a from procname(n-1)+1 do
                if not isprime(a) and modp(a,6) in {1,5} then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A038509(n),n=1..30) ; # R. J. Mathar, Feb 28 2020
  • Mathematica
    Select[Range[1000], FactorInteger[#][[1,1]] >= 5 && ! PrimeQ[#] &] (* Robert G. Wilson v, Dec 19 2009 *)
    With[{nn=400},Select[Rest[Complement[Range[nn],Prime[Range[ PrimePi[ nn]]]]], MemberQ[ {1,5},Mod[#,6]]&]] (* Harvey P. Dale, Feb 21 2013 *)
    Select[Range[400],CompositeQ[#]&&MemberQ[{1,5},Mod[#,6]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 13 2019 *)
  • PARI
    is(n)=gcd(n,6)==1 && !isprime(n) && n>7 \\ Charles R Greathouse IV, Nov 20 2012

Formula

a(n) ~ 3n. - Charles R Greathouse IV, Nov 20 2012

Extensions

More terms from Robert G. Wilson v, Dec 19 2009
Entry revised by N. J. A. Sloane, Dec 31 2011, at the suggestion of Gary Detlefs

A133634 Nonprime numbers k such that binomial(k+p,k) mod k = 1, where p=4.

Original entry on oeis.org

10, 25, 26, 34, 35, 49, 50, 55, 58, 65, 74, 77, 82, 85, 91, 95, 98, 106, 115, 119, 121, 122, 125, 130, 133, 143, 145, 146, 154, 155, 161, 169, 170, 175, 178, 185, 187, 194, 202, 203, 205, 209, 215, 217, 218, 221, 226, 235, 242, 245, 247, 250, 253, 259, 265, 266
Offset: 1

Views

Author

Hieronymus Fischer, Sep 30 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[300],!PrimeQ[#]&&Mod[Binomial[#+4,#],#]==1&] (* Harvey P. Dale, Oct 09 2011 *)

A133636 Nonprime numbers k such that binomial(k+p,k) mod k = 1, where p=6.

Original entry on oeis.org

9, 27, 49, 63, 77, 81, 91, 99, 117, 119, 121, 133, 143, 153, 161, 169, 171, 187, 189, 203, 207, 209, 217, 221, 243, 247, 253, 259, 261, 279, 287, 289, 297, 299, 301, 319, 323, 329, 333, 341, 343, 351, 361, 369, 371, 377, 387, 391, 403, 407, 413, 423, 427, 437
Offset: 1

Views

Author

Hieronymus Fischer, Sep 30 2007

Keywords

Comments

Also composite n such that binomial(7*n,7)== n (mod n^2). - Gary Detlefs, Sep 24 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[500],CompositeQ[#]&&Mod[Binomial[#+6,#],#]==1&] (* Harvey P. Dale, Jan 30 2025 *)
  • PARI
    isok(n) = ! isprime(n) && ((binomial(n+6, n) % n) == 1); \\ Michel Marcus, Sep 25 2013
    
  • PARI
    isok(n) = ! isprime(n) && ((binomial(7*n, 7) % n^2) == n); \\ Michel Marcus, Sep 25 2013

A133621 Numbers k such that binomial(k+p,k) mod k = 1, where p=10.

Original entry on oeis.org

3, 4, 11, 13, 17, 19, 23, 29, 31, 33, 37, 41, 43, 47, 53, 57, 59, 61, 67, 68, 71, 73, 79, 83, 85, 87, 89, 97, 101, 103, 107, 109, 111, 113, 121, 127, 131, 137, 139, 141, 143, 149, 151, 157, 163, 164, 167, 169, 173, 179, 181, 185, 187, 191, 193, 197, 199, 209, 211
Offset: 1

Views

Author

Hieronymus Fischer, Sep 30 2007

Keywords

Comments

All primes q > p are included, in that binomial(q+p,q) == (1+floor(p/q)) == 1 (mod q) holds for those primes.

Crossrefs

Programs

  • PARI
    isok(n) = ((binomial(n+10, n) % n) == 1) \\ Michel Marcus, Jul 15 2013
Showing 1-10 of 35 results. Next