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.

Previous Showing 11-16 of 16 results.

A054713 Number of powers of 13 modulo n.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 2, 2, 3, 4, 10, 1, 2, 2, 4, 4, 4, 3, 18, 4, 2, 10, 11, 2, 20, 2, 9, 2, 14, 4, 30, 8, 10, 4, 4, 3, 36, 18, 2, 4, 40, 2, 21, 10, 12, 11, 46, 4, 14, 20, 4, 2, 13, 9, 20, 2, 18, 14, 58, 4, 3, 30, 6, 16, 5, 10, 66, 4, 11, 4, 70, 6, 72, 36, 20, 18, 10, 2, 39, 4, 27, 40, 82, 2, 4
Offset: 1

Views

Author

Henry Bottomley, Apr 20 2000

Keywords

Crossrefs

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

Programs

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

A054714 Number of powers of 14 modulo n.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 4, 6, 3, 5, 4, 1, 2, 2, 5, 16, 7, 18, 4, 3, 6, 22, 5, 10, 2, 18, 3, 28, 3, 15, 6, 10, 17, 3, 8, 12, 19, 2, 5, 8, 3, 21, 7, 6, 23, 23, 6, 3, 11, 16, 3, 52, 19, 10, 4, 18, 29, 58, 4, 6, 16, 7, 7, 2, 11, 11, 18, 22, 3, 10, 9, 72, 13, 10, 20, 6, 3, 26, 6, 54, 9, 82, 4, 16
Offset: 1

Views

Author

Henry Bottomley, Apr 20 2000

Keywords

Crossrefs

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

Programs

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

A054715 Number of powers of 15 modulo n.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 1, 2, 3, 2, 5, 3, 12, 1, 2, 2, 8, 3, 18, 3, 2, 5, 22, 3, 3, 12, 4, 2, 28, 2, 10, 2, 6, 8, 2, 4, 36, 18, 13, 3, 40, 2, 21, 10, 3, 22, 46, 3, 7, 3, 9, 12, 13, 4, 6, 2, 19, 28, 29, 3, 15, 10, 3, 4, 13, 6, 11, 8, 23, 2, 35, 4, 72, 36, 3, 18, 5, 13, 26, 3, 5, 40, 82, 3, 9, 21, 29
Offset: 1

Views

Author

Henry Bottomley, Apr 20 2000

Keywords

Crossrefs

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

Programs

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

A054716 Number of powers of 16 modulo n.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 5, 2, 3, 4, 1, 2, 2, 4, 9, 2, 3, 6, 11, 2, 5, 4, 9, 4, 7, 2, 5, 3, 5, 3, 3, 4, 9, 10, 3, 2, 5, 4, 7, 6, 3, 12, 23, 2, 21, 6, 2, 4, 13, 10, 5, 4, 9, 8, 29, 2, 15, 6, 3, 3, 3, 6, 33, 3, 11, 4, 35, 4, 9, 10, 5, 10, 15, 4, 39, 2, 27, 6, 41, 4, 2, 8, 7, 6, 11, 4, 3, 12, 5, 24
Offset: 1

Views

Author

Henry Bottomley, Apr 20 2000

Keywords

Crossrefs

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

Programs

  • Mathematica
    a[n_] := IntegerExponent[8*n, 16] + MultiplicativeOrder[16, n/2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Aug 25 2024 *)

A121341 Number of decimal places before 1/n either recurs or terminates.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 6, 3, 1, 1, 2, 3, 6, 7, 2, 4, 16, 2, 18, 2, 6, 3, 22, 4, 2, 7, 3, 8, 28, 2, 15, 5, 2, 17, 7, 3, 3, 19, 6, 3, 5, 7, 21, 4, 2, 23, 46, 5, 42, 2, 16, 8, 13, 4, 3, 9, 18, 29, 58, 3, 60, 16, 6, 6, 7, 3, 33, 18, 22, 7, 35, 4, 8, 4, 3, 20, 6, 7, 13, 4, 9, 6, 41, 8, 17, 22, 28, 5, 44, 2, 6
Offset: 1

Views

Author

Anthony C Robin, Aug 29 2006

Keywords

Comments

In this sequence, the repeating decimals (e.g., 1/7) are treated differently from nonrepeating decimals (e.g., 1/5). If they are treated the same, then a(2)=2, a(4)=3, a(5)=2, a(8)=4, a(10)=2, ... and we obtain A054710. The two sequence differ only for n = 2^j * 5^k.

Examples

			1/592 = 0.0016891891891... starts with 4 decimals (0016, zeros counted) and has period 3 (digits 891) to yield a(592) = 4 + 3 = 7.
		

Crossrefs

A007732 is the length of the periods and serves as a lower bound. Cf. A061075.

Programs

  • Mathematica
    a[n_] := Max[IntegerExponent[n, 2], IntegerExponent[n, 5]] + Length[RealDigits[1/n][[1, -1]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 20 2022 *)

Formula

a(n) = A051628(n) + A051626(n). - Sean A. Irvine, Apr 13 2022

Extensions

More terms from T. D. Noe, Aug 30 2006
Additional comments from R. J. Mathar, Aug 30 2006

A307070 a(n) is the number of decimal places before the decimal expansion of 1/n terminates, or the period of the recurring portion of 1/n if it is recurring.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 6, 3, 1, 1, 2, 1, 6, 6, 1, 4, 16, 1, 18, 2, 6, 2, 22, 1, 2, 6, 3, 6, 28, 1, 15, 5, 2, 16, 6, 1, 3, 18, 6, 3, 5, 6, 21, 2, 1, 22, 46, 1, 42, 2, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 6, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13
Offset: 1

Views

Author

Luke W. Richards, Mar 22 2019

Keywords

Comments

If the decimal expansion of 1/n terminates, we will write it as ending with infinitely many 0's (rather than 9's). Then for any n > 1, the expansion of 1/n consists of a preamble whose length is given by A051628(n), followed by a periodic part with period length A007732(n). This sequence is defined as follows: If the only primes dividing n are 2 and 5 (see A003592), a(n) = A051628(n), otherwise a(n) = A007732(n) (and the preamble is ignored). - N. J. A. Sloane, Mar 22 2019
This sequence was discovered by a school class (aged 12-13) at Arden School, Solihull, UK.
Equally space the digits 0-9 on a circle. The digits of the decimal expansion of rational numbers can be connected on this circle to form data visualizations. This sequence is useful, cf. A007732 or A051626, for identifying the complexity of that visualization.

Examples

			1/1 is 1.0. There are no decimal digits, so a(1) = 0.
1/2 is 0.5. This is a terminating decimal. There is 1 digit, so a(2) = 1.
1/6 is 0.166666... This is a recurring decimal with a period of 1 (the initial '1' does not recur) so a(6) = 1.
1/7 is 0.142857142857... This is a recurring decimal, with a period of 6 ('142857') so a(7) = 6.
		

Crossrefs

See A114205 and A051628 for the preamble, A036275 and A051626 for the periodic part.

Programs

  • PARI
    a(n) = my (t=valuation(n,2), f=valuation(n,5), r=n/(2^t*5^f)); if (r==1, max(t,f), znorder(Mod(10, r))) \\ Rémy Sigrist, May 08 2019
  • Python
    def sequence(n):
      count = 0
      dividend = 1
      remainder = dividend % n
      remainders = [remainder]
      no_recurrence = True
      while remainder != 0:
        count += 1
        dividend = remainder * 10
        remainder = dividend % n
        if remainder in remainders:
          if no_recurrence:
            no_recurrence = False
            remainders = [remainder]
          else:
            return len(remainders)
        else:
          remainders.append(remainder)
      else:
        return count
    

Extensions

More terms from Rémy Sigrist, May 08 2019
Previous Showing 11-16 of 16 results.