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

A054704 Number of powers of 3 modulo n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 2, 3, 4, 5, 3, 3, 6, 5, 4, 16, 3, 18, 4, 7, 5, 11, 3, 20, 3, 4, 6, 28, 5, 30, 8, 6, 16, 12, 4, 18, 18, 4, 4, 8, 7, 42, 10, 6, 11, 23, 5, 42, 20, 17, 6, 52, 4, 20, 6, 19, 28, 29, 5, 10, 30, 8, 16, 12, 6, 22, 16, 12, 12, 35, 4, 12, 18, 21, 18, 30, 4, 78, 4, 5, 8, 41, 7, 16
Offset: 1

Views

Author

Henry Bottomley, Apr 20 2000

Keywords

Crossrefs

Cf. A054703 (base 2), A054705 (4), A054706 (5), A054707 (6), 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, 3]}, e + MultiplicativeOrder[3, n/3^e]]; Array[a, 100] (* Amiram Eldar, Aug 25 2024 *)

Formula

a(n) = A007734(n) + A007949(n). - Amiram Eldar, Aug 25 2024

A007737 Period of repeating digits of 1/n in base 6.

Original entry on oeis.org

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

Views

Author

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

Keywords

Comments

Not multiplicative. Smallest counterexample: a(77)=10, but a(7) = 2 and a(11) = 10. - Mitch Harris, May 16 2005.

Crossrefs

Cf. A007733 (base 2), A007734 (3), A007735 (4), A007736 (5), 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/#, 6] &, 80] (* Robert G. Wilson v, Jun 10 2011 *)
    a[n_] := MultiplicativeOrder[6, n/Times @@ ({2, 3}^IntegerExponent[n, {2, 3}])]; Array[a, 100] (* Amiram Eldar, Aug 26 2024 *)
  • PARI
    a(n)=znorder(Mod(6, n/2^valuation(n, 2)/3^valuation(n, 3))); \\ Joerg Arndt, Dec 14 2014

Extensions

More terms from David W. Wilson

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

A173934 Irregular triangle in which row n consists of numbers m < k/2 such that m/k is in the Cantor set, where k= A173931(n) and gcd(m,k) = 1.

Original entry on oeis.org

1, 1, 3, 1, 3, 4, 1, 3, 9, 1, 3, 9, 13, 1, 3, 7, 9, 19, 21, 25, 27, 1, 3, 9, 10, 27, 30, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, 5, 11, 15, 33, 45, 47, 5, 15, 41, 45, 47, 59, 7, 16, 21, 22, 48, 61, 63, 66, 1, 3, 7, 9, 19, 21, 25, 27, 55, 57, 63, 73, 75, 79, 81, 1, 3, 9, 27
Offset: 1

Views

Author

T. D. Noe, Mar 03 2010

Keywords

Comments

The length of row n is A173933(n). Observe that the m are actually less than k/3. Note that (k-m)/k is also in the Cantor set. If m appears in a row, then 3m does also. Let A and B be the first and last numbers in row n, then it appears that k = A + 3B. This implies A = k (mod 3). The interesting graph of this triangle shows that some ranges of m are not allowed.
When k is a prime of the form (3^r-1)/2, then the row consists of the 2^(r-1)-1 numbers (greater than 0) whose base-3 representation consists of only 0's and 1's. Hence, for r=3,7, and 13, the primes k are 13, 1093, and 797161, and the number of m < k/2 is 3, 63, and 4095.

Crossrefs

Programs

  • Mathematica
    Flatten[Last[Transpose[cantor]]] (* see A173931 *)

Extensions

Name qualified by Peter Munn, Jul 06 2019

A333334 a(n) is the smallest positive number k such that n divides 3^k + k.

Original entry on oeis.org

1, 1, 3, 1, 3, 3, 6, 5, 9, 3, 2, 9, 10, 15, 3, 13, 4, 9, 18, 17, 6, 29, 22, 21, 23, 17, 27, 25, 28, 3, 5, 13, 57, 23, 6, 9, 36, 23, 12, 37, 40, 15, 17, 29, 63, 63, 35, 45, 6, 23, 27, 17, 19, 27, 57, 109, 18, 31, 10, 57, 52, 5, 90, 45, 17, 57, 66, 65, 63, 23, 70
Offset: 1

Views

Author

Jinyuan Wang, Mar 15 2020

Keywords

Comments

For any positive integer n, if k = a(n) + n*m*A007734(n) and m >= 0 then 3^k + k is divisible by n.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, While[!Divisible[3^k + k, n], k++]; k]; Array[a, 100] (* Amiram Eldar, Mar 16 2020 *)
  • PARI
    a(n) = for(k=1, oo, if(Mod(3, n)^k==-k, return(k)));

Formula

a(3^m) = 3^m for m >= 0.
a(p) <= p - 1 if p is a prime greater than 3.

A333339 a(n) is the smallest positive number k such that n divides 3^k - k.

Original entry on oeis.org

1, 1, 3, 3, 7, 3, 2, 3, 9, 7, 4, 3, 16, 5, 27, 11, 5, 9, 29, 7, 27, 45, 39, 3, 73, 27, 27, 27, 22, 27, 132, 27, 36, 5, 27, 27, 65, 29, 27, 27, 27, 27, 10, 59, 27, 39, 12, 27, 47, 73, 42, 27, 68, 27, 36, 27, 30, 47, 154, 27, 192, 147, 27, 59, 16, 45, 119, 75, 39
Offset: 1

Views

Author

Jinyuan Wang, Mar 16 2020

Keywords

Comments

For any positive integer n, if k = a(n) + n*m*A007734(n) and m >= 0 then 3^k - k is divisible by n.
a(n) > log_3(n). - Robert Israel, Mar 19 2020

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from 1 do if 3 &^k - k mod n = 0 then return k fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 19 2020
  • Mathematica
    a[n_] := Module[{k = 1}, While[!Divisible[3^k - k, n], k++]; k]; Array[a, 100] (* Amiram Eldar, Mar 16 2020 *)
  • PARI
    a(n) = for(k=1, oo, if(Mod(3, n)^k==k, return(k)));

Formula

a(3^m) = 3^m for m >= 0.
a(3^m-m) = m for m >= 1. - Robert Israel, Mar 19 2020

A336504 3-practical numbers: numbers m such that the polynomial x^m - 1 has a divisor of every degree <= m in the prime field F_3[x].

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 15, 16, 18, 20, 24, 26, 27, 30, 32, 36, 39, 40, 42, 44, 45, 48, 52, 54, 56, 60, 63, 64, 66, 72, 78, 80, 81, 84, 88, 90, 96, 99, 100, 104, 105, 108, 112, 117, 120, 126, 128, 130, 132, 135, 140, 144, 150, 156, 160, 162, 165, 168, 176, 180
Offset: 1

Views

Author

Amiram Eldar, Jul 23 2020

Keywords

Comments

For a rational prime number p, a "p-practical number" is a number m such that the polynomial x^m - 1 has a divisor of every degree <= m in F_p[x], the prime field of order p.
A number m is 3-practical if and only if every number 1 <= k <= m can be written as Sum_{d|m} A007734(d) * n_d, where A007734(d) is the multiplicative order of 3 modulo the largest divisor of d not divisible by 3, and 0 <= n_d <= phi(d)/A007734(d).
The number of terms not exceeding 10^k for k = 1, 2, ... are 7, 41, 258, 1881, 15069, 127350, 1080749, ...

Crossrefs

Programs

  • Mathematica
    rep[v_, c_] := Flatten @ Table[ConstantArray[v[[i]], {c[[i]]}], {i, Length[c]}]; mo[n_, p_] := MultiplicativeOrder[p, n/p^IntegerExponent[n, p]]; ppQ[n_, p_] := Module[{d = Divisors[n]}, m = mo[#, p] & /@ d; ns = EulerPhi[d]/m; r = rep[m, ns]; Min @ Rest @ CoefficientList[Series[Product[1 + x^r[[i]], {i, Length[r]}], {x, 0, n}], x] >  0]; Select[Range[200], ppQ[#, 3] &]
Showing 1-10 of 12 results. Next