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

A201908 Irregular triangle of 2^k mod (2n-1).

Original entry on oeis.org

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

Views

Author

T. D. Noe, Dec 07 2011

Keywords

Comments

The length of the rows is given by A002326. For n > 1, the first term of row n is 1 and the last term is n. Many sequences are in this one: starting at A036117 (mod 11) and A070335 (mod 23).
Row n, for n >= 2, divided elementwise by (2*n-1) gives the cycles of iterations of the doubling function D(x) = 2*x or 2*x-1 if 0 <= x < 1/2 or , 1/2 <= x < 1, respectively, with seed 1/(2*n-1). See the Devaney reference, pp. 25-26. D^[k](x) = frac(2^k/(2*n-1)), for k = 0, 1, ..., A002326(n-1) - 1. E.g., n = 3: 1/5, 2/5, 4/5, 3/5. - Gary W. Adamson and Wolfdieter Lang, Jul 29 2020.

Examples

			The irregular triangle T(n, k) begins:
n\k  0 1 2 3  4  5  6  7 8  9 10 11 12 13 14 15 16 17 ...
---------------------------------------------------------
1:   0
2:   1 2
3:   1 2 4 3
4:   1 2 4
5:   1 2 4 8  7  5
6:   1 2 4 8  5 10  9  7 3  6
7:   1 2 4 8  3  6 12 11 9  5 10  7
8:   1 2 4 8
9:   1 2 4 8 16 15 13  9
10:  1 2 4 8 16 13  7 14 9 18 17 15 11  3  6 12  5 10
... reformatted by _Wolfdieter Lang_, Jul 29 2020.
		

References

  • Robert L. Devaney, A First Course in Chaotic Dynamical Systems, Addison-Wesley., 1992. pp. 24-25

Crossrefs

Cf. A002326, A201909 (3^k), A201910 (5^k), A201911 (7^k).
Cf. A000034 (3), A070402 (5), A069705 (7), A036117 (11), A036118 (13), A062116 (17), A036120 (19), A070347 (21), A070335 (23), A070336 (25), A070337 (27), A036122 (29), A070338 (33), A070339 (35), A036124 (37), A070340 (39), A070348 (41), A070349 (43), A070350 (45), A070351 (47), A036128 (53), A036129 (59), A036130 (61), A036131 (67), A036135 (83), A036138 (101), A036140 (107), A201920 (125), A036144 (131), A036146 (139), A036147 (149), A036150 (163), A036152 (173), A036153 (179), A036154 (181), A036157 (197), A036159 (211), A036161 (227).

Programs

  • GAP
    R:=List([0..72],n->OrderMod(2,2*n+1));;
    Flat(Concatenation([0],List([2..11],n->List([0..R[n]-1],k->PowerMod(2,k,2*n-1))))); # Muniru A Asiru, Feb 02 2019
  • Mathematica
    nn = 30; p = 2; t = p^Range[0, nn]; Flatten[Table[If[IntegerQ[Log[p, n]], {0}, tm = Mod[t, n]; len = Position[tm, 1, 1, 2][[-1,1]]; Take[tm, len-1]], {n, 1, nn, 2}]]

Formula

T(n, k) = 2^k mod (2*n-1), n >= 1, k = 0, 1, ..., A002326(n-1) - 1.
T(n, k) = (2*n-1)*frac(2^k/(2*n-1)), n >= 1, k = 0, 1, ..., A002326(n-1) - 1, with the fractional part frac(x) = x - floor(x). - Wolfdieter Lang, Jul 29 2020

A010691 Period 2: repeat (1,10).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Regular continued fraction of (5+sqrt 35)/10. - R. J. Mathar, Nov 21 2011
Sequence is an infinite palindrome in two ways (numbers and English names): ONE, TEN, ONE, TEN, ONE, TEN, ONE, ... . - Eric Angelini, Sep 16 2023

Crossrefs

Programs

  • Magma
    [10^n mod 11: n in [0..80]]; // Vincenzo Librandi, Aug 24 2011
  • Maple
    g:=(1+10*z)/((1-z^2)): gser:=series(g, z=0, 66): seq((coeff(gser, z, n)), n=0..65); # Zerinvary Lajos, Feb 25 2009
  • Mathematica
    PadRight[{},100,{1,10}] (* Harvey P. Dale, Aug 27 2013 *)

Formula

a(n) = -9/2*(-1)^n + 11/2.
G.f.: (1+10*z)/(1-z^2). - Zerinvary Lajos, Feb 25 2009
a(n) = 10^n mod 11. - M. F. Hasler, Mar 10 2011
From Nicolas Bělohoubek, Nov 11 2021: (Start)
a(n) = 10/a(n-1). See also A010695.
a(n) = 11 - a(n-1). See also A010712. (End)

A168429 a(n) = 4^n mod 11.

Original entry on oeis.org

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

Views

Author

Zerinvary Lajos, Nov 25 2009

Keywords

Comments

Period 5: repeat [1, 4, 5, 9, 3].

Crossrefs

See also A036117.

Programs

  • Mathematica
    Table[Mod[4^n, 11], {n, 0, 50}] (* G. C. Greubel, Mar 05 2016 *)
    PowerMod[4,Range[0,100],11] (* or *) PadRight[{},100,{1,4,5,9,3}] (* Harvey P. Dale, Jul 02 2021 *)
  • PARI
    a(n)=4^n%11 \\ Charles R Greathouse IV, Oct 16 2015
  • Sage
    [power_mod(4, n, 11) for n in range(0, 95)]
    

Formula

a(n) = a(n-5). G.f.: (1+4*x+5*x^2+9*x^3+3*x^4)/((1-x) * (1+x+x^2+x^3+x^4)). - R. J. Mathar, Apr 13 2010

A062116 a(n) = 2^n mod 17.

Original entry on oeis.org

1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13
Offset: 0

Views

Author

Olivier Gérard, Jun 06 2001

Keywords

Comments

Period 8.

Examples

			a(5) = 32 mod 17 = 15.
		

References

  • I. M. Vinogradov, Elements of Number Theory, pp. 220 ff.

Crossrefs

Programs

  • GAP
    a:=List([0..70],n->PowerMod(2,n,17));; Print(a); # Muniru A Asiru, Jan 29 2019
  • Magma
    [2^n mod 17: n in [0..100]]; // G. C. Greubel, Oct 16 2018
    
  • Mathematica
    Mod[#,17]&/@(2^Range[0,100])  (* Harvey P. Dale, Mar 06 2011 *)
  • PARI
    a(n) = { lift(Mod(2,17)^n) } \\ Harry J. Smith, Aug 01 2009
    
  • Sage
    [power_mod(2,n,17) for n in range(0,87)] # Zerinvary Lajos, Nov 03 2009
    

Formula

From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-1) - a(n-4) + a(n-5).
G.f.: (1 + x + 2*x^2 + 4*x^3 + 9*x^4)/((1-x)*(1+x^4)). (End)
a(n) = 17 - a(n+4) = a(n+8) for all n in Z. - Michael Somos, Oct 17 2018

A201912 Irregular triangle of 2^k mod prime(n).

Original entry on oeis.org

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

Views

Author

T. D. Noe, Dec 17 2011

Keywords

Comments

The row lengths are in A014664. For n > 1, the first term of each row is 1 and the last term is 2*prime(n)-1, which is A006254. Many sequences are in this one.

Examples

			The first 11 rows are:
2:  0;
3:  1, 2;
5:  1, 2, 4, 3;
7:  1, 2, 4;
11: 1, 2, 4, 8,  5, 10,  9,  7,  3,  6;
13: 1, 2, 4, 8,  3,  6, 12, 11,  9,  5, 10,  7;
17: 1, 2, 4, 8, 16, 15, 13,  9;
19: 1, 2, 4, 8, 16, 13,  7, 14,  9, 18, 17, 15, 11,  3,  6, 12,  5, 10;
23: 1, 2, 4, 8, 16,  9, 18, 13,  3,  6, 12;
29: 1, 2, 4, 8, 16,  3,  6, 12, 24, 19,  9, 18,  7, 14, 28, 27, 25, 21, 13, 26, 23, 17, 5, 10, 20, 11, 22, 15;
31: 1, 2, 4, 8, 16;
		

Crossrefs

Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), A269266 (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67), A036135 (p=83), A036138 (p=101), A036140 (p=107), A036144 (p=131), A036146 (p=139), A036147 (p=149), A036150 (p=163), A036152 (p=173), A036153 (p=179), A036154 (p=181), A036157 (p=197), A036159 (p=211), A036161 (p=227).

Programs

  • GAP
    P:=Filtered([1..350],IsPrime);;
    R:=List([1..Length(P)],n->OrderMod(2,P[n]));;
    Flat(Concatenation([0],List([2..10],n->List([0..R[n]-1],k->PowerMod(2,k,P[n]))))); # Muniru A Asiru, Feb 01 2019
  • Mathematica
    nn = 10; p = 2; t = p^Range[0,Prime[nn]]; Flatten[Table[If[Mod[n, p] == 0, {0}, tm = Mod[t, n]; len = Position[tm, 1, 1, 2][[-1,1]]; Take[tm, len-1]], {n, Prime[Range[nn]]}]]

A187466 a(n) = 9^n mod 11.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Mar 10 2011

Keywords

Comments

Period 5: repeat [1, 9, 4, 3, 5].

Crossrefs

Programs

Formula

G.f.: (5*x^4 + 3*x^3 + 4*x^2 + 9*x + 1)/(1 - x^5). - Chai Wah Wu, Jun 04 2016
a(n) = a(n-5) for n>4. - Wesley Ivan Hurt, Jun 11 2016

A269266 a(n) = 2^n mod 31.

Original entry on oeis.org

1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1
Offset: 0

Views

Author

Vincenzo Librandi, Mar 31 2016

Keywords

References

  • Continued fraction expansion of (1651+sqrt(3236405))/2386. - Bruno Berselli, Mar 31 2016

Crossrefs

Cf. A201912 (11th row of the triangle).
Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), this sequence (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67).

Programs

  • GAP
    List([0..70],n->PowerMod(2,n,31)); # Muniru A Asiru, Jan 30 2019
  • Magma
    [Modexp(2, n, 31): n in [0..100]];
    
  • Magma
    &cat [[1,2,4,8,16]^^20] // Bruno Berselli, Mar 31 2016
    
  • Mathematica
    PowerMod[2, Range[0, 100], 31]
  • PARI
    a(n)=2^(n%5) \\ Charles R Greathouse IV, Mar 31 2016
    
  • PARI
    x='x+O('x^99); Vec((1+2*x+4*x^2+8*x^3+16*x^4)/(1-x^5)) \\ Altug Alkan, Mar 31 2016
    
  • Python
    for n in range(0,100):print(2**n%31) # Soumil Mandal, Apr 03 2016
    
  • Python
    def A269266(n): return pow(2,n,31) # Chai Wah Wu, Jan 03 2022
    
  • Sage
    [2^mod(n,5) for n in (0..100)] # Bruno Berselli, Mar 31 2016
    

Formula

G.f.: (1 + 2*x + 4*x^2 + 8*x^3 + 16*x^4)/(1 - x^5).
a(n) = a(n-5).
a(n) = 2^(n mod 5). - Bruno Berselli, Mar 31 2016

A008830 Discrete logarithm of n to the base 2 modulo 11.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Equivalently, a(n) is the multiplicative order of n with respect to base 2 (modulo 11), i.e., a(n) is the base-2 logarithm of the smallest k such that 2^k mod 11 = n. - Jon E. Schoenfield, Aug 21 2021

Examples

			From _Jon E. Schoenfield_, Aug 21 2021: (Start)
Sequence is a permutation of the 10 integers 0..9:
   k     2^k  2^k mod 11
  --  ------  ----------
   0       1           1  so a(1)  =  0
   1       2           2  so a(2)  =  1
   2       4           4  so a(4)  =  2
   3       8           8  so a(8)  =  3
   4      16           5  so a(5)  =  4
   5      32          10  so a(10) =  5
   6      64           9  so a(9)  =  6
   7     128           7  so a(7)  =  7
   8     256           3  so a(3)  =  8
   9     512           6  so a(6)  =  9
  10    1024           1
but a(1) = 0, so the sequence is finite with 10 terms.
(End)
		

References

  • I. M. Vinogradov, Elements of Number Theory, p. 220.

Crossrefs

Cf. A036117.

Programs

  • Magma
    j := 11; F := FiniteField(j); PrimitiveElement(F); [ Log(F!n) : n in [ 1..j-1 ]];
    
  • Maple
    a:= n-> numtheory[mlog](n, 2, 11):
    seq(a(n), n=1..10);  # Alois P. Heinz, Aug 21 2021
  • Python
    from sympy.ntheory import discrete_log
    def a(n): return discrete_log(11, n, 2)
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Aug 13 2021

Formula

2^a(n) == n (mod 11). - Michael S. Branicky, Aug 13 2021

A202149 Triangle read by rows: T(n, k) = mod(2^k, n), where 1 <= k < n.

Original entry on oeis.org

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

Views

Author

Alonso del Arte, Dec 12 2011

Keywords

Comments

Rows indexed by odd primes end in 1 (and of course so do rows indexed by base 2 pseudoprimes, A001567). Of those rows, the ones that are permutations of the integers 1 to p - 1 correspond to primes with primitive root 2 (A001122).

Examples

			Triangle starts:
0
2 1
2 0 0
2 4 3 1
2 4 2 4  2
2 4 1 2  4 1
2 4 0 0  0 0 0
2 4 8 7  5 1 2 4
2 4 8 6  2 4 8 6 2
2 4 8 5 10 9 7 3 6 1
2 4 8 4  8 4 8 4 8 4 8
		

Crossrefs

Cf. A036117, 2^n mod 11; A036118, 2^n mod 13; A201908, irregular triangle of 2^k mod (2n - 1).

Programs

  • Mathematica
    ColumnForm[Table[PowerMod[2, k, n], {n, 2, 20}, {k, n - 1}], Center]
Showing 1-9 of 9 results.