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.

A054707 Number of powers of 6 modulo n.

Original entry on oeis.org

1, 2, 2, 3, 1, 2, 2, 4, 3, 2, 10, 3, 12, 3, 2, 5, 16, 3, 9, 3, 3, 11, 11, 4, 5, 13, 4, 4, 14, 2, 6, 6, 11, 17, 2, 3, 4, 10, 13, 4, 40, 3, 3, 12, 3, 12, 23, 5, 14, 6, 17, 14, 26, 4, 10, 5, 10, 15, 58, 3, 60, 7, 4, 7, 12, 11, 33, 18, 12, 3, 35, 4, 36, 5, 6, 11, 10, 13, 78, 5, 5, 41, 82, 4, 16
Offset: 1

Views

Author

Henry Bottomley, Apr 20 2000

Keywords

Crossrefs

Cf. A054703 (base 2), A054704 (3), A054705 (4), A054706 (5), A054708 (7), A054709 (8), A054717 (9), A054710 (10), A351524 (11), A054712 (12), A054713 (13), A054714 (14), A054715 (15), A054716 (16).

Programs

  • Mathematica
    a[n_] := Module[{e = IntegerExponent[n, {2, 3}]}, Max[e] + MultiplicativeOrder[6, n/Times @@ ({2, 3}^e)]]; Array[a, 100] (* Amiram Eldar, Aug 25 2024 *)

Formula

a(n) = A007737(n) + A244417(n). - Amiram Eldar, Aug 25 2024

A066799 Square array read by antidiagonals of eventual period of powers of k mod n; period of repeating digits of 1/n in base k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 2, 1, 4, 2, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 2, 2, 1, 2, 3, 2, 6, 1, 1, 1, 1, 1, 4, 1, 6, 1, 1, 4, 1, 1, 1, 1, 1, 4, 1, 2, 2, 3, 4, 10, 1, 1, 1, 2, 1, 2, 2, 1, 1, 6, 2, 5, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 5, 2, 12
Offset: 1

Views

Author

Henry Bottomley, Dec 20 2001

Keywords

Comments

The determinant of the n X n matrix made from the northwest corner of this array is 0^(n-1). - Iain Fox, Mar 12 2018

Examples

			Rows start: 1,1,1,1,1,...; 1,1,1,1,1,...; 1,2,1,1,2,...; 1,1,2,1,1; 1,4,4,2,1,... T(3,2)=2 since the powers of 2 become 1,2,1,2,1,2,... mod 3 with period 2. T(4,2)=1 since the powers of 2 become 1,2,0,0,0,0,... mod 4 with eventual period 1.
Beginning of array:
+-----+--------------------------------------------------------------------
| n\k |  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  ...
+-----+--------------------------------------------------------------------
|  1  |  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
|  2  |  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
|  3  |  1,  2,  1,  1,  2,  1,  1,  2,  1,  1,  2,  1,  1,  2,  1,  1, ...
|  4  |  1,  1,  2,  1,  1,  1,  2,  1,  1,  1,  2,  1,  1,  1,  2,  1, ...
|  5  |  1,  4,  4,  2,  1,  1,  4,  4,  2,  1,  1,  4,  4,  2,  1,  1, ...
|  6  |  1,  2,  1,  1,  2,  1,  1,  2,  1,  1,  2,  1,  1,  2,  1,  1, ...
|  7  |  1,  3,  6,  3,  6,  2,  1,  1,  3,  6,  3,  6,  2,  1,  1,  3, ...
|  8  |  1,  1,  2,  1,  2,  1,  2,  1,  1,  1,  2,  1,  2,  1,  2,  1, ...
| ... |
		

Crossrefs

Columns are A000012, A007733, A007734, A007735, A007736, A007737, A007738, A007739, A007740, A007732. A002322 is the highest value in each row and the least common multiple of each row, while the number of distinct values in each row is A066800.

Programs

  • Mathematica
    t[n_, k_] := For[p = PowerMod[k, n, n]; m = n + 1, True, m++, If[PowerMod[k, m, n] == p, Return[m - n]]]; Flatten[Table[t[n - k + 1, k], {n, 1, 14}, {k, n, 1, -1}]] (* Jean-François Alcover, Jun 04 2012 *)
  • PARI
    a(n, k) = my(p=k^n%n); for(m=n+1, +oo, if(k^m%n==p, return(m-n))) \\ Iain Fox, Mar 12 2018

Formula

T(n, k) = T(n, k-n) if k > n.
T(n, n) = T(n, n+1) = 1.
T(n, n-1) = 2.

A007735 Period of base 4 representation of 1/n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 3, 2, 5, 1, 6, 3, 2, 1, 4, 3, 9, 2, 3, 5, 11, 1, 10, 6, 9, 3, 14, 2, 5, 1, 5, 4, 6, 3, 18, 9, 6, 2, 10, 3, 7, 5, 6, 11, 23, 1, 21, 10, 4, 6, 26, 9, 10, 3, 9, 14, 29, 2, 30, 5, 3, 1, 6, 5, 33, 4, 11, 6, 35, 3, 9, 18, 10, 9, 15, 6, 39, 2, 27, 10, 41, 3, 4, 7, 14, 5, 11, 6, 6, 11, 5
Offset: 1

Views

Author

N. J. A. Sloane, Hal Sampson (hals(AT)easynet.com)

Keywords

Crossrefs

Cf. A007733 (base 2), A007734 (3), A007736 (5), A007737 (6), A007738 (7), A007739 (8), A007740 (9), A007732 (10).

Programs

  • Mathematica
    DigitCycleLength[r_Rational, b_Integer?Positive] := MultiplicativeOrder[b, FixedPoint[ Quotient[#, GCD[#, b]] &, Denominator[r]]]; DigitCycleLength[1, b_Integer?Positive] = 1; Array[ DigitCycleLength[1/#, 4] &, 80] (* Robert G. Wilson v, Jun 10 2011 *)
    a[n_] := MultiplicativeOrder[4, n/2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Aug 26 2024 *)

Extensions

More terms from David W. Wilson

A007740 Period of repeating digits of 1/n in base 9.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 5, 1, 3, 3, 2, 2, 8, 1, 9, 2, 3, 5, 11, 1, 10, 3, 1, 3, 14, 2, 15, 4, 5, 8, 6, 1, 9, 9, 3, 2, 4, 3, 21, 5, 2, 11, 23, 2, 21, 10, 8, 3, 26, 1, 10, 3, 9, 14, 29, 2, 5, 15, 3, 8, 6, 5, 11, 8, 11, 6, 35, 1, 6, 9, 10, 9, 15, 3, 39, 2, 1, 4, 41, 3, 8, 21, 14, 5, 44, 2, 3, 11, 15, 23
Offset: 1

Views

Author

N. J. A. Sloane, Hal Sampson (hals(AT)easynet.com)

Keywords

Comments

Not multiplicative. Smallest counterexample a(5) = a(16) = 2, but a(80) = 2. - David W. Wilson, Jun 09 2005

Crossrefs

Cf. A007733 (base 2), A007734 (3), A007735 (4), A007736 (5), A007737 (6), A007738 (7), A007739 (8), A007732 (10).

Programs

  • Mathematica
    DigitCycleLength[r_Rational, b_Integer?Positive] := MultiplicativeOrder[b, FixedPoint[ Quotient[#, GCD[#, b]] &, Denominator[r]]]; DigitCycleLength[1, b_Integer?Positive] = 1; Array[ DigitCycleLength[1/#, 9] &, 80] (* Robert G. Wilson v, Jun 10 2011 *)
    a[n_] := MultiplicativeOrder[9, n/3^IntegerExponent[n, 3]]; Array[a, 100] (* Amiram Eldar, Aug 26 2024 *)

A007739 Period of repeating digits of 1/n in base 8.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 1, 1, 2, 4, 10, 2, 4, 1, 4, 1, 8, 2, 6, 4, 2, 10, 11, 2, 20, 4, 6, 1, 28, 4, 5, 1, 10, 8, 4, 2, 12, 6, 4, 4, 20, 2, 14, 10, 4, 11, 23, 2, 7, 20, 8, 4, 52, 6, 20, 1, 6, 28, 58, 4, 20, 5, 2, 1, 4, 10, 22, 8, 22, 4, 35, 2, 3, 12, 20, 6, 10, 4, 13, 4, 18, 20, 82, 2, 8, 14, 28, 10, 11, 4, 4
Offset: 1

Views

Author

N. J. A. Sloane, Hal Sampson (hals(AT)easynet.com)

Keywords

Crossrefs

Cf. A007733 (base 2), A007734 (3), A007735 (4), A007736 (5), A007737 (6), A007738 (7), A007740 (9), A007732 (10).

Programs

  • Mathematica
    DigitCycleLength[r_Rational, b_Integer?Positive] := MultiplicativeOrder[b, FixedPoint[ Quotient[#, GCD[#, b]] &, Denominator[r]]]; DigitCycleLength[1, b_Integer?Positive] = 1; Array[ DigitCycleLength[1/#, 8] &, 80] (* Robert G. Wilson v, Jun 10 2011 *)
    a[n_] := MultiplicativeOrder[8, n/2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Aug 26 2024 *)

Extensions

More terms from David W. Wilson

A019439 Number of ways of tiling a 2 X n rectangle with dominoes and trominoes.

Original entry on oeis.org

1, 1, 2, 6, 17, 43, 108, 280, 727, 1875, 4832, 12470, 32191, 83075, 214372, 553214, 1427673, 3684333, 9507936, 24536616, 63320419, 163407771, 421697922, 1088253936, 2808400703, 7247494517, 18703234038, 48266468208, 124558777387, 321442392689, 829529751892, 2140724511882
Offset: 0

Views

Author

N. J. A. Sloane, Oct 04 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A007737.

References

  • Jaime Rangel-Mondragon, Polyominoes and Related Families, The Mathematica Journal, 9:3 (2005), 609-640.

Crossrefs

Column k=2 of A364457.

Programs

  • Maple
    a:= n-> (Matrix([[1, 1, 0, 0, 1, 1]]). Matrix (6, (i,j)-> if i=j-1 then 1 elif j=1 then [2, 0, 3, 2, 1, -1][i] else 0 fi)^n)[1,2]: seq(a(n), n=0..30); # Alois P. Heinz, Sep 24 2009
  • Mathematica
    LinearRecurrence[{2, 0, 3, 2, 1, -1}, {1, 1, 2, 6, 17, 43}, 40] // Rest (* Jean-François Alcover, Feb 18 2016 *)

Formula

G.f.: -(x^3+x-1)/(x^6-x^5-2*x^4-3*x^3-2*x+1). - Alois P. Heinz, Sep 24 2009

Extensions

More terms from Alois P. Heinz, Sep 24 2009
a(0)=1 prepended by Alois P. Heinz, Jul 25 2023

A249772 Period of the senary (base-6) representation of 1/n, or 0 if 1/n terminates.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 10, 0, 12, 2, 1, 0, 16, 0, 9, 1, 2, 10, 11, 0, 5, 12, 0, 2, 14, 1, 6, 0, 10, 16, 2, 0, 4, 9, 12, 1, 40, 2, 3, 10, 1, 11, 23, 0, 14, 5, 16, 12, 26, 0, 10, 2, 9, 14, 58, 1, 60, 6, 2, 0, 12, 10, 33, 16, 11, 2, 35, 0, 36, 4, 5, 9, 10, 12, 78, 1, 0, 40, 82, 2, 16
Offset: 1

Views

Author

Michal Kaczmarczyk, Dec 03 2014

Keywords

Examples

			a(7)=2, because 1/7 has senary period 2 (0.0505050505...).
		

Crossrefs

Cf. A051626 (base 10), A246004 (base 12).
With ones instead of zeros: A007737, A066799 (all bases as columns).

Programs

  • Mathematica
    f[n_] := Length[ RealDigits[1/n, 6][[1, -1]]]; Array[f, 85] (* Robert G. Wilson v, Jan 09 2015 *)

Extensions

More terms from Robert G. Wilson v, Jan 09 2015
Showing 1-7 of 7 results.