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 21-30 of 39 results. Next

A178335 Integers for which the decimal expansion of the reciprocal contains the repeating digits 1,4,2,8,5,7 (corresponding to the decimal expansion of 1/7).

Original entry on oeis.org

7, 14, 28, 35, 56, 70, 112, 140, 175, 224, 280, 350, 448, 560, 700, 875, 896, 1120, 1400, 1750, 1792, 2240, 2800, 3500, 3584, 4375, 4480, 5600, 7000, 7168, 8750, 8960, 11200, 14000, 14336, 17500, 17920, 21875, 22400, 28000, 28672, 35000, 35840, 43750
Offset: 1

Views

Author

Joost de Winter, May 25 2010

Keywords

Comments

All terms are == 0 (mod 7).
If m appears, so does 10*m. Therefore the primitive terms (they will not end in 0) are: 7, 14, 28, 35, 56, 112, 175, 224, 448, 875, 896, 1792, 3584, 4375, 7168, 14336, 21875, 28672,... (see A158204).
From R. J. Mathar, Jul 13 2010: (Start)
a(n) = 7*A003592(n). [Proof: the a(n) are defined demanding that 1/a(n) = t/10^b+1/(7*10^c) for a transient integer t>=0 and a periodic part 1/(7*10^c) for some b>=0 and c>=0.
Note this splits the chain of decimal digits right in front of the period 142857, which means the least significant digits of t may be some of the least significant digits of 142857. We may assume that 1/(7*10^c) < 1/10^b, so c>=b.
Multiply by a(n)*7*10^c to get 7*10^c = a(n)*(7*t*10^(c-b)+1). Reduction modulo 7 shows that a(n)=7*k, so 10^c = k*(7*t*10^(c-b)+1).
Decomposition of both sides into prime factors shows that k must be of the form 2^i*5^j, which shows that the a(n) are of the form 7*A003592(.)
To demonstrate that none of the A003592 are missed it remains to show that the other factor, 7*t*10^(c-b)+1, can always be chosen of the form 2^(i')*5^(i'+i-j) to cancel the excess of the two exponents that the prime factorization of k may have: 10^c =2^c*5^c demands equal exponents.
Because t and 10^(c-b) can chosen freely, this is equivalent to showing that there is always a t, a c-b and an i' such that 7*t*10^(c-b)+1 = 10^i'*(excess power of 2 or 5).
On the right hand side, the (power of 2 or 5) mod 7 is a fixed number between 1 and 6.
As i' runs through 7 consecutive numbers, 10^i' mod 7 attains all numbers between 1 and 6; the product 10^i'*(power of 2 or 5) can always be tuned to == 1 (mod 7) by selection of i', and t*10^(c-b) follows by division. This shows that all k of the form 2^i*5^j contribute to the sequence.] (End)

Examples

			1/7 = 0.142857142857143..., 1/14 = 0.0714285714285714...
		

Crossrefs

Programs

  • Mathematica
    digitCycleLength[ r_Rational, b_Integer?Positive ] := MultiplicativeOrder[ b, FixedPoint[ Quotient[ #, GCD[ #, b ] ] &, Denominator[ r ] ] ] (* from Wolfram Library, Help Menu for MultiplicativeOrder *); fQ[ n_ ] := MemberQ[ {{1, 4, 2, 8, 5, 7}, {4, 2, 8, 5, 7, 1}, {2, 8, 5, 7, 1, 4}, {8, 5, 7, 1, 4, 2}, {5, 7, 1, 4, 2, 8}, {7, 1, 4, 2, 8, 5}}, RealDigits[ 1/n ][ [ 1, -1 ] ] ]; k = 0; lst = {}; While[ k < 10^9, If[ digitCycleLength[ 1/k, 10 ] == 6 && fQ[ k ], Print@k; AppendTo[ lst, k ] ]; k += 7 ]; lst

Extensions

Edited, corrected and extended by Robert G. Wilson v, May 31 2010

A266385 a(n) = floor(10^k/n) where k is the smallest integer such that the whole first period or the whole terminating fractional part of the decimal expansion of 1/n is shifted to appear before the decimal point in 10^k/n.

Original entry on oeis.org

1, 5, 3, 25, 2, 16, 142857, 125, 1, 1, 9, 83, 76923, 714285, 6, 625, 588235294117647, 5, 52631578947368421, 5, 47619, 45, 434782608695652173913, 416, 4, 384615, 37, 3571428, 344827586206896551724137931, 3, 32258064516129, 3125, 3, 2941176470588235, 285714, 27
Offset: 1

Views

Author

M. F. Hasler, Dec 28 2015

Keywords

Comments

The period is given in A051626 (with 0 if 1/n terminates) and A007732 (with 1 if 1/n terminates). The periodic part is given in A060284 (with initial 0's omitted) and A036275 (with initial 0's appended).

Examples

			a(1) = 1 because 1/1 = 1.0 (k = 0),
a(2) = 5 because 1/2 = 0.5 (k = 1),
a(3) = 3 because 1/3 = 0.{3}*, where {...}* means that these digits repeat forever.
a(4) = 25 because 1/4 = 0.25 (k = 2),
a(5) = 2 because 1/5 = 0.2 (k = 1),
a(6) = 16 because 1/6 = 0.1{6}* (k = 2),
a(7) = 142857 because 1/7 = 0.{142857}* (k = 6),
a(8) = 125 because 1/8 = 0.125 (k = 3),
a(9) = 1 because 1/9 = 0.{1}* (k = 1),
a(10) = 1 because 1/10 = 0.1 (k = 1), ...
		

Crossrefs

Formula

a(n) = A060284(n) (mod 10^A051626(n)).

Extensions

Name edited and a(13) onwards from Mohammed Yaseen, Jun 03 2021

A284602 Numbers k such that the decimal representation of 1/k is either finite or has even period.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 21, 22, 23, 25, 26, 28, 29, 32, 33, 34, 35, 38, 39, 40, 42, 44, 46, 47, 49, 50, 51, 52, 55, 56, 57, 58, 59, 61, 63, 64, 65, 66, 68, 69, 70, 73, 76, 77, 78, 80, 84, 85, 87, 88, 89, 91, 92, 94, 95, 97, 98, 99, 100, 101, 102, 103, 104, 105, 109, 110, 112, 113, 114, 115
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 30 2017

Keywords

Comments

All numbers of the form 2^i*5^j with i, j >= 0 are in this sequence (numbers with a finite decimal expansion).
From Robert G. Wilson v, Apr 02 2017: (Start)
If k is in the sequence, then so are 2k and 5k.
The complement of A284601.
Primitives: 1, 7, 11, 13, 17, 19, 21, 23, 29, 33, 39, 47, 49, 51, 57, 59, 61, 63, ..., .
(End)

Examples

			14 is in the sequence because 1/14 = 0.0714285(714285)..., whose period is 6, an even number.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[115], Mod[Length[RealDigits[1/#][[1, -1]]], 2] == 0 & ]

A179193 Sum of the number of repeating digits for each reciprocal of integer m, where 1 < m < n and n is the base.

Original entry on oeis.org

0, 1, 1, 4, 1, 9, 9, 9, 9, 20, 15, 30, 22, 28, 23, 52, 33, 63, 58, 44, 65, 86, 84, 67, 68, 102, 135, 140, 74, 142, 171, 159, 142, 124, 88, 220, 204, 205, 238, 258, 209, 244, 231, 201, 245, 304, 328, 214, 291, 292, 465, 422, 380, 350, 422, 381, 507, 507, 417, 627
Offset: 2

Views

Author

Will Nicholes, Jul 01 2010

Keywords

Comments

No digits are counted as repeating for 1/m if 1/m terminates.
Equivalent to 1 <= m <= n, since 1/n and 1/1 do not have repeating digits in any integer base n.

Examples

			7th term considers octal: the fractions 1/2, 1/3, 1/4, 1/5, 1/6 and 1/7 have 0, 2, 0, 4, 2 and 1 repeating (octal) digits respectively, for a total of 9.
9th term considers decimal: the fractions 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8 and 1/9 have 0, 1, 0, 0, 1, 6, 0 and 1 repeating (decimal) digits respectively, for a total of 9.
		

Crossrefs

Cf. A051626.

Programs

  • Mathematica
    a[n_] := Sum[Length[RealDigits[1/k, n][[1, -1]]], {k, 2, n-1}]; Array[a, 100, 2] (* Amiram Eldar, Jun 28 2024 *)

Extensions

Data corrected and extended by Amiram Eldar, Jun 28 2024

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

A291943 a(0)=0; for n>0, a(n) = (2n)-th digit after the decimal point in the decimal expansion of 1/(2n+1).

Original entry on oeis.org

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

Views

Author

Marco Matosic, Sep 06 2017

Keywords

Examples

			a(3)=7 since we want the sixth decimal digit of 1/7.
		

References

  • John H. Conway & Richard K. Guy, The Book of Numbers; Springer 1996.

Crossrefs

Programs

  • Maple
    f:= proc(n) floor(10^(2*n)/(2*n+1)) mod 10 end proc:
    f(0):= 0:
    map(f, [$0..100]); # Robert Israel, Oct 31 2017
  • Mathematica
    f[n_] := Mod[Floor[10^(2n)/(2n +1)], 10]; f[0] = 0; Array[f, 105, 0] (* Robert G. Wilson v, Oct 31 2017 *)

Extensions

Edited by N. J. A. Sloane, Oct 30 2017
a(82) corrected by Robert Israel, Oct 31 2017

A306355 Numbers k such that the period of 1/k, or 0 if 1/k terminates, is strictly greater than the period of the decimal expansion of 1/m for all m < k.

Original entry on oeis.org

1, 3, 7, 17, 19, 23, 29, 47, 59, 61, 97, 109, 113, 131, 149, 167, 179, 181, 193, 223, 229, 233, 257, 263, 269, 289, 313, 337, 361, 367, 379, 383, 389, 419, 433, 461, 487, 491, 499, 503, 509, 541, 571, 577, 593, 619, 647, 659, 701, 709, 727, 743, 811, 821, 823
Offset: 1

Views

Author

Matthew Schulz, Feb 09 2019

Keywords

Comments

This sequence is infinite because 1/(10^k-1) has a period of k for all k, so the period can be arbitrarily large.
Are 1, 3, 289 and 361 the only terms that are not in A001913? - Robert Israel, Feb 10 2019

Examples

			7 is a term because 1/7 has a period of 6, which is greater than the periods of 1/m for m < 7.
		

Crossrefs

Contains A001913.

Programs

  • Maple
    count:= 1: A[1]:= 1: m:= 0:
    for k from 0 to 100 do
      for d in [3,7,9,11] do
         x:= 10*k+d;
         p:= numtheory:-order(10,x);
         if p > m then
            m := p;
            count:= count+1;
            A[count]:= x
         fi
    od od:
    seq(A[i],i=1..count); # Robert Israel, Feb 10 2019
  • Mathematica
    ResourceFunction["ProgressiveMaxPositions"]@
     Map[n |->
        First[RealDigits[n]] /. {{_, list_?ListQ} :> Length[list],
          list_?ListQ -> 0}][
      1/Range[1050]] (* Peter Cullen Burbery, Aug 05 2023 *)

Formula

RECORDS transform of A051626.

A334603 Period of the fraction 1/11^n for n >= 1.

Original entry on oeis.org

2, 22, 242, 2662, 29282, 322102, 3543122, 38974342, 428717762, 4715895382, 51874849202, 570623341222, 6276856753442, 69045424287862, 759499667166482, 8354496338831302, 91899459727144322, 1010894056998587542, 11119834626984462962, 122318180896829092582
Offset: 1

Views

Author

Bernard Schott, May 07 2020

Keywords

Comments

Conjecture proposed by the authors in References page 205: if p is a prime with gcd(p,30) = 1 and if the period of 1/p is m then the period of 1/p^n is m*p^(n-1).

Examples

			1/121 = 0. 0082644628099173553719 0082644628099173553719 ... with periodic part {0082644628099173553719}, whose length is 22 digits, so a(2) = 22.
		

References

  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 346 pp. 50, 204-205, Ellipses, Paris 2004.

Crossrefs

Cf. period of fractions: A051626 (1/n), A133494 (1/3^n), A055272 (1/7^n).
Cf. A001020 (11^n).

Programs

  • Mathematica
    MultiplicativeOrder[10, 11^#] & /@ Range[20] (* Giovanni Resta, May 07 2020 *)
  • PARI
    a(n) = znorder(Mod(10, 11^n)); \\ Michel Marcus, May 09 2020

Formula

a(n) = 2 * 11^(n-1) [conjectured, see comments].
a(n) = A051626(A001020(n)).

Extensions

More terms from Giovanni Resta, May 07 2020

A362840 a(n) is the smallest number x between 1 and n-1 for which the number 1/x achieves the longest cycle of repeating digits in its expansion in base n.

Original entry on oeis.org

2, 3, 3, 5, 5, 5, 7, 7, 9, 7, 11, 9, 13, 11, 11, 11, 13, 17, 19, 19, 17, 17, 23, 23, 25, 23, 19, 23, 29, 29, 23, 31, 29, 23, 29, 23, 37, 29, 19, 37, 31, 31, 17, 43, 41, 43, 47, 37, 47, 47, 41, 49, 53, 53, 47, 53, 49, 47, 59, 47, 61, 59, 59, 47, 61, 61, 67, 59, 61, 59
Offset: 3

Views

Author

Itamar Zamir, May 05 2023

Keywords

Comments

Terminating expansions, in any base, are considered to have a cycle period of length 0.
It appears by observation that all terms in the sequence are either primes or powers of primes.

Examples

			a(3)=2 since in base 3, 1/2 is represented by 0.111... with a cycle of 1 repeating digit, which is the longest cycle among 1/x for x = 1..2.
a(10)=7 since in base 10, 1/7 is represented by 0.142857... with a cycle of 6 repeating digits, which is the longest cycle among 1/x for x = 1..9.
		

Crossrefs

Cf. A362865 (corresponding cycle lengths).
Cf. A051626.

A362865 a(n) is the length of the longest possible cycle of repeating digits in the digits expansion of 1/x, in base n, among all numbers x between 1 and n-1.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 3, 6, 6, 6, 10, 6, 12, 5, 10, 10, 12, 16, 18, 18, 16, 16, 11, 11, 20, 22, 18, 22, 28, 28, 22, 30, 14, 11, 28, 22, 36, 28, 18, 36, 30, 30, 16, 42, 40, 42, 23, 36, 23, 46, 40, 42, 52, 52, 46, 52, 42, 46, 58, 46, 60, 29, 58, 46, 60, 60, 66, 58, 60
Offset: 3

Views

Author

Itamar Zamir, May 06 2023

Keywords

Comments

This longest cycle may be attained by multiple values of x, among which x = A362840(n) is the smallest.

Examples

			a(10)=6 since in base 10, the longest possible cycle of recurrent digits for 1/x is of length 6, which appears for 1/7 = 0.142857...
		

Crossrefs

Cf. A362840.
Cf. A051626.
Previous Showing 21-30 of 39 results. Next