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

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

A133910 Period numbers of A133900 divided by n^2.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 6, 1, 4, 3, 1, 1, 8, 1, 4, 3, 8, 1, 6, 1, 8, 1, 4, 1, 360, 1, 1, 9, 16, 5, 24, 1, 16, 9, 20, 1, 144, 1, 8, 15, 16, 1, 18, 1, 16, 9, 8, 1, 16, 5, 28, 9, 16, 1, 360, 1, 16, 21, 1, 5, 288, 1, 16, 9, 1120, 1, 24, 1, 32, 9, 16, 7, 288, 1, 20, 1, 64, 1, 6048, 5, 32, 27, 8
Offset: 1

Views

Author

Hieronymus Fischer, Oct 20 2007

Keywords

Examples

			a(6)=2, since A133900(6)/6^2=72/36=2.
a(18)=8, since A133900(18)/18^2=2592/324=8.
		

Crossrefs

Formula

a(n)=A133900(n)/n^2.
a(n)=1, iff n is a prime or a power of a prime (including n=1).
If a prime p is a factor of a(n), then p is also a factor of n.

A042964 Numbers that are congruent to 2 or 3 mod 4.

Original entry on oeis.org

2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31, 34, 35, 38, 39, 42, 43, 46, 47, 50, 51, 54, 55, 58, 59, 62, 63, 66, 67, 70, 71, 74, 75, 78, 79, 82, 83, 86, 87, 90, 91, 94, 95, 98, 99, 102, 103, 106, 107, 110, 111, 114, 115, 118, 119, 122, 123, 126, 127
Offset: 1

Views

Author

Keywords

Comments

Also numbers m such that binomial(m+2, m) mod 2 = 0. - Hieronymus Fischer, Oct 20 2007
Also numbers m such that floor(1+(m/2)) mod 2 = 0. - Hieronymus Fischer, Oct 20 2007
Partial sums of the sequence 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, ... which has period 2. - Hieronymus Fischer, Oct 20 2007
In groups of four add and divide by two the odd and even numbers. - George E. Antoniou, Dec 12 2001
From Jeremy Gardiner, Jan 22 2006: (Start)
Comments on the "mystery calculator". There are 6 cards.
Card 0: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, ... (A005408 sequence).
Card 1: 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31, 34, 35, 38, 39, ... (this sequence).
Card 2: 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31, 36, 37, 38, 39, ... (A047566).
Card 3: 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 40, 41, 42, ... (A115419).
Card 4: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 48, 49, 50, ... (A115420).
Card 5: 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, ... (A115421).
The trick: You secretly select a number between 1 and 63 from one of the cards. You indicate to me the cards on which that number appears; I tell you the number you selected!
The solution: I add together the first term from each of the indicated cards. The total equals the selected number. The numbers in each sequence all have a "1" in the same position in their binary expansion. Example: You indicate cards 1, 3 and 5. Your selected number is 2 + 8 + 32 = 42.
Numbers having a 1 in position 1 of their binary expansion. One of the mystery calculator sequences: A005408, A042964, A047566, A115419, A115420, A115421. (End)
Complement of A042948. - Reinhard Zumkeller, Oct 03 2008
Also the 2nd Witt transform of A040000 [Moree]. - R. J. Mathar, Nov 08 2008
In general, sequences of numbers congruent to {a,a+i} mod k will have a closed form of (k-2*i)*(2*n-1+(-1)^n)/4+i*n+a, from offset 0. - Gary Detlefs, Oct 29 2013
Union of A004767 and A016825; Fixed points of A098180. - Wesley Ivan Hurt, Jan 14 2014, Oct 13 2015

Crossrefs

Programs

  • Magma
    [2*n+((-1)^(n-1)-1)/2 : n in [1..100]]; // Wesley Ivan Hurt, Oct 13 2015
    
  • Magma
    [n: n in [1..150] | n mod 4 in [2, 3]]; // Vincenzo Librandi, Oct 13 2015
    
  • Maple
    A042964:=n->2*n+((-1)^(n-1)-1)/2; seq(A042964(n), n=1..100); # Wesley Ivan Hurt, Jan 07 2014
  • Mathematica
    Flatten[Table[4n + {2, 3}, {n, 0, 31}]] (* Alonso del Arte, Feb 07 2013 *)
    Select[Range[200],MemberQ[{2,3},Mod[#,4]]&] (* or *) LinearRecurrence[ {1,1,-1},{2,3,6},90] (* Harvey P. Dale, Nov 28 2018 *)
  • PARI
    a(n)=2*n+2-n%2
    
  • PARI
    Vec((2+x+x^2)/((1-x)*(1-x^2)) + O(x^100)) \\ Altug Alkan, Oct 13 2015

Formula

a(n) = A047406(n)/2.
From Michael Somos, Jan 12 2000: (Start)
G.f.: x*(2+x+x^2)/((1-x)*(1-x^2)).
a(n) = a(n-1) + 2 + (-1)^n. (End)
a(n) = 2n if n is odd, otherwise n = 2n - 1. - Amarnath Murthy, Oct 16 2003
a(n) = (3 + (-1)^(n-1))/2 + 2*(n-1) = 2n + 2 - (n mod 2). - Hieronymus Fischer, Oct 20 2007
A133872(a(n)) = 0. - Reinhard Zumkeller, Oct 03 2008
a(n) = 4*n - a(n-1) - 3 (with a(1) = 2). - Vincenzo Librandi, Nov 17 2010
a(n) = 2*n + ((-1)^(n-1) - 1)/2. - Gary Detlefs, Oct 29 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 - log(2)/4. - Amiram Eldar, Dec 05 2021
E.g.f.: 1 + ((4*x - 1)*exp(x) - exp(-x))/2. - David Lovler, Aug 08 2022

Extensions

Edited by N. J. A. Sloane, Jun 30 2008 at the suggestion of R. J. Mathar
Corrected by Jaroslav Krizek, Dec 18 2009

A133911 Number of prime factors (counted with multiplicity) of the period numbers defined by A133900.

Original entry on oeis.org

0, 2, 2, 4, 2, 5, 2, 6, 4, 6, 2, 8, 2, 6, 5, 8, 2, 9, 2, 8, 5, 7, 2, 10, 4, 7, 6, 8, 2, 12, 2, 10, 6, 8, 5, 12, 2, 8, 6, 11, 2, 12, 2, 9, 8, 8, 2, 13, 4, 10, 6, 9, 2, 12, 5, 11, 6, 8, 2, 14, 2, 8, 8, 12, 5, 13, 2, 10, 6, 13, 2, 14, 2, 9, 8, 10, 5, 13, 2, 13, 8, 10, 2, 17, 5, 9, 7, 11, 2, 16, 5, 10, 7, 9
Offset: 1

Views

Author

Hieronymus Fischer, Oct 20 2007

Keywords

Examples

			a(6)=5, since A133900(6)=72=2*2*2*3*3.
a(12)=8, since A133900(12)=864=2*2*2*2*2*3*3*3.
		

Crossrefs

Formula

a(n)=A001222(A133900(n)).

A134331 Sum of prime factors (counted with multiplicity) of the period numbers defined by A133900.

Original entry on oeis.org

0, 4, 6, 8, 10, 12, 14, 12, 12, 18, 22, 19, 26, 22, 19, 16, 34, 22, 38, 22, 23, 32, 46, 23, 20, 36, 18, 26, 58, 37, 62, 20, 34, 46, 29, 29, 74, 50, 38, 31, 82, 38, 86, 36, 30, 58, 94, 30, 28, 32, 46, 40, 106, 30, 37, 37, 50, 70, 118, 41, 122, 74, 36, 24, 41, 48, 134, 50, 58, 50
Offset: 1

Views

Author

Hieronymus Fischer, Oct 20 2007

Keywords

Examples

			a(6)=12, since A133900(6)=72=2*2*2*3*3 and 2+2+2+3+3=12.
a(12)=19, since A133900(12)=864=2*2*2*2*2*3*3*3 and 2+2+2+2+2+3+3+3=19.
		

Crossrefs

A134332 Integer part of the arithmetic mean of the prime factors (counted with multiplicity) of the period numbers defined by A133900.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 3, 3, 11, 2, 13, 3, 3, 2, 17, 2, 19, 2, 4, 4, 23, 2, 5, 5, 3, 3, 29, 3, 31, 2, 5, 5, 5, 2, 37, 6, 6, 2, 41, 3, 43, 4, 3, 7, 47, 2, 7, 3, 7, 4, 53, 2, 7, 3, 8, 8, 59, 2, 61, 9, 4, 2, 8, 3, 67, 5, 9, 3, 71, 2, 73, 9, 4, 5, 8, 4, 79, 2, 3, 9, 83, 3, 9, 11, 10, 3, 89, 2, 9, 6, 11, 12
Offset: 1

Views

Author

Hieronymus Fischer, Oct 23 2007

Keywords

Examples

			a(6)=2, since floor(A134331(6)/A133911(6))=floor(12/5)=2.
a(7)=7, since floor(A134331(7)/A133911(7))=floor(14/2)=7.
		

Crossrefs

Formula

a(n)=floor(A134331(n)/A133911(n)) for n>1, defining a(1):=1.
a(n)=n, if n is a prime or 1.

A133884 a(n) = binomial(n+4,n) mod 4.

Original entry on oeis.org

1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Periodic with length 4^2=16.

Examples

			For n=2, binomial(6,2) = 6*5/2 = 15, which is 3 (mod 4) so a(2) = 3. - _Michael B. Porter_, Jul 19 2016
		

Crossrefs

Programs

  • Magma
    [Binomial(n+4,n) mod 4: n in [0..100]]; // Vincenzo Librandi, Jul 15 2016
  • Mathematica
    Table[Mod[Binomial[n + 4, 4], 4], {n, 0, 100}] (* Vincenzo Librandi, Jul 15 2016 *)

Formula

a(n) = binomial(n+4,4) mod 4.
G.f.: (1 + x + 3*x^2 + 3*x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 2*x^7 + 3*x^8 + 3*x^9 + x^10 + x^11)/(1 - x^16) = (1 + 2*x^2 + 2*x^6 + x^8)/((1 - x)*(1 + x^4)*(1 + x^8)).
a(n) = A000505(n+5) mod 4. - John M. Campbell, Jul 14 2016
a(n) = A000506(n+6) mod 4. - John M. Campbell, Jul 15 2016

Extensions

G.f. corrected by Bruno Berselli, Jul 19 2016

A133906 Least number m such that binomial(n+m, m) mod m = 1.

Original entry on oeis.org

2, 3, 5, 2, 2, 7, 9, 2, 2, 3, 3, 2, 2, 17, 17, 2, 2, 3, 3, 2, 2, 23, 25, 2, 2, 4, 3, 2, 2, 31, 37, 2, 2, 8, 8, 2, 2, 3, 41, 2, 2, 4, 4, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 4, 4, 2, 2, 67, 3, 2, 2, 44, 44, 2, 2, 16, 16, 2, 2, 3, 4, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 89, 9, 2, 2, 3, 3, 2, 2, 97, 97, 2, 2, 7
Offset: 1

Views

Author

Hieronymus Fischer, Oct 20 2007

Keywords

Examples

			a(1)=2, since binomial(1+2, 2) mod 2 = 3 mod 2 = 1 and 2 is the minimal number with this property.
a(7)=9 because of binomial(7+9, 9) = 11440 = 1271*9 + 1, but binomial(7+k, k) mod k <> 1 for all numbers < 9.
		

Crossrefs

Programs

  • Mathematica
    Table[Block[{m = 1}, While[Mod[Binomial[n + m, m], m] != 1, m++]; m], {n, 98}] (* Michael De Vlieger, Jul 30 2018 *)
  • PARI
    a(n) = {my(m = 1, ok = 0); until (ok, if (binomial(n+m, m) % m == 1, ok = 1, m++);); return (m);} \\ Michel Marcus, Jul 15 2013

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

A133905 Least composite number m such that binomial(n+m,m) mod m = 1.

Original entry on oeis.org

4, 9, 25, 10, 26, 9, 9, 9, 6, 4, 4, 34, 34, 85, 289, 4, 4, 57, 87, 8, 8, 25, 25, 25, 134, 4, 4, 15, 15, 111, 111, 4, 4, 8, 8, 10, 10, 121, 121, 82, 86, 4, 4, 49, 49, 49, 49, 4, 4, 265, 68, 10, 10, 8, 8, 6, 9, 4, 4, 194, 194, 469, 249, 4, 4, 44, 44, 146, 146, 16, 16, 6, 6, 4, 4, 162
Offset: 1

Views

Author

Hieronymus Fischer, Oct 20 2007

Keywords

Examples

			a(1)=4, since binomial(1+4,4) mod 4 = 5 mod 4 = 1 and 4 is the minimal composite number with this property.
a(5)=26 because of binomial(5+26,26)=169911=6535*26+1, but binomial(5+k,k) mod k<>1 for all composite numbers <26.
		

Crossrefs

Programs

  • Mathematica
    lcn[n_]:=Module[{m=4},While[PrimeQ[m]||Mod[Binomial[n+m,m],m]!=1,m++];m]; Array[lcn,80] (* Harvey P. Dale, May 13 2022 *)
  • PARI
    a(n) = { my(m = 4, ok = 0); until (ok, if (! isprime(m) && (binomial(n+m, m) % m == 1), ok = 1, m++);); return (m);} \\ Michel Marcus, Jul 15 2013
Showing 1-10 of 19 results. Next