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 31-39 of 39 results.

A092280 Partial sums of periods of reciprocals.

Original entry on oeis.org

0, 1, 1, 1, 2, 8, 8, 9, 9, 11, 12, 18, 24, 25, 25, 41, 42, 60, 60, 66, 68, 90, 91, 91, 97, 100, 106, 134, 135, 150, 150, 152, 168, 174, 175, 178, 196, 202, 202, 207, 213, 234, 236, 237, 259, 305, 306, 348, 348, 364, 370, 383, 386, 388, 394, 412, 440, 498, 499, 559
Offset: 2

Views

Author

Jeff Burch, Jan 27 2004

Keywords

Crossrefs

Cf. A051626.

A173491 a(n) is the least k such that the period of the decimal expansion of 1/k is A000204(n).

Original entry on oeis.org

3, 27, 101, 239, 21649, 19, 3191, 35121409, 722817036322379041, 2241, 797, 967, 1230610745978027, 3373, 60787, 509538919, 15060275578609, 5779, 37397, 423557
Offset: 1

Views

Author

Michel Lagneau, Feb 19 2010

Keywords

Comments

Smallest k such that A007732(k) = A000204(n).
For the large numbers (p > 70), the Maple program below is very slow. So we use a process of two steps: first, factor 10^p-1 using the elliptic curve method; then, for each factor q(k), k=1,2,...,r, compute the period of 1/q(k) and keep the period q(i) such that q(i) ... [unfinished sentence? - R. J. Mathar, Feb 24 2010] Compare the Maple section of A170945!

Examples

			a(1)=3 because the period of 1/3 = 0.333... is 1, and 3 is the smallest number with that period.
a(2)=27 because the period of 1/27 = 0.037037... is 3 = A000204(2), and 27 is the smallest number with that period.
a(3)=101 because the period of 1/101 = 0.00990099... is 4 = A000204(3), and 101 is the smallest number with that period.
a(4)= 239 because the period of 1/239 = 0.00418410041841... is 7 = A000204(4), and 239 is the smallest number with that period.
		

References

  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Programs

  • Maple
    T:=array(0..100); U:=array(0..100); n0:=1: n1:=3: T[1] := 1: T[2] := 3:for i from 3 to 30 do: n2:=n0+n1: T[i]:=n2: n0:=n1: n1:=n2: od:
    for q from 1 to 7 do: p0:=T[q]: indic:=0: for n from 1 to 25000 do: for p from 1 to 30 while(irem(10^p, n)<>1 or gcd(n,10)<>1 ) do: od: if irem(10^p,n) = 1 and gcd(n,10) = 1 and p=p0 and indic=0 then U[q]:=n: indic:=1: else fi: od: od:
    for n from 1 to 7 do: print( U[n]): od:
  • Mathematica
    (* This [slow] mma program gives all denominators < 50000 and disagrees with existing sequence for n = 11: a(11) = 797 instead of 29453 *) a204[n_] := a204[n] = Coefficient[Series[(2 - t )/(1 - t - t^2), {t, 0, n}], t^n] ; a7732[n_] := a7732[n] = MultiplicativeOrder[10, FixedPoint[Quotient[#, GCD[#, 10]] &, n]]; a[n_] := (k = 2; While[k++; k < 50000 && a7732[k] != a204[n] ]; k); Table[a[n], {n, 1, 15}](* Jean-François Alcover, Sep 02 2011 *)

Extensions

References to unrelated sequences removed by R. J. Mathar, Feb 24 2010
Extended with the help of Jean-François Alcover and D. S. McNeil by T. D. Noe, Sep 07 2011

A265730 Zeroless numbers n such that the decimal expansion of a/b contains each digit of n, for all a,b > 0 such that concatenate(a,b) = n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 16, 17, 27, 47, 52, 57, 78, 87, 117, 131, 151, 157, 158, 161, 171, 177, 187, 191, 247, 257, 277, 417, 447, 457, 487, 517, 547, 557, 558, 587, 592, 717, 747, 757, 787, 817, 857, 887, 1131, 1147, 1151, 1157, 1161, 1167, 1171, 1177, 1181, 1191, 1221, 1247, 1251, 1257, 1261, 1287, 1331, 1361, 1371, 1417
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Dec 14 2015

Keywords

Comments

Termed "1951 numbers" by Eric Angelini, cf. LINKS.

Examples

			The single-digit numbers 1,...,9 are in the sequence because there is no possible decomposition a,b.
The number 1951 is in the sequence because 195/1 = 195.0, 19/51 = 0.3725490196... and 1/951 = 0.0010515247108307045215562565720294... all have each of the digits '1', '5' and '9' the number 1951 is made of.
		

Crossrefs

Cf. A051626.

Programs

  • Mathematica
    fQ[n_] := Block[{d = IntegerDigits@ n, w}, w = Map[Union@ Flatten@ # &, First /@ RealDigits@ Map[FromDigits@ Take[d, #]/FromDigits@ Take[d, -Length@ d + #] &, Reverse@ Range[Length@ d - 1]], {1}]; And @@ Function[k, AllTrue[d, MemberQ[k, #] &]] /@ w]; Select[Select[Range@ 1500, Last@ DigitCount@ # == 0 &], fQ] (* Michael De Vlieger, Dec 14 2015 *)
  • PARI
    is(n,d=Set(digits(n)),p=n+#Str(n))={vecmin(d)&&!for(i=10,n,setminus(d,Set(digits(n\i*10^p\(n%i))))&&return;i=i*10-1)}

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

A307388 Length of the period of decimal representation of Product_{k=1..n} A038111(k)/A038110(k).

Original entry on oeis.org

1, 27, 729, 59049, 43046721, 31381059609, 68630377364883, 150094635296999121, 328256967394537077627, 717897987691852588770249, 4710128697246244834921603689, 92709463147897837085761925410587, 3649600726280146254718103955713167842
Offset: 9

Views

Author

Jamie Morken, Apr 06 2019

Keywords

Comments

The offset is 9 since for 0 < n < 5, the product is an integer, and for 4 < n < 9 the decimal expansion ends with zeros.

Examples

			For example for n=9 with (2/1) * (6/1) * (15/1) * (105/4) * (385/8) * (1001/16) * (17017/192) * (323323/3072) * (7436429/55296) = 2759414170256180364552625 / 154618822656 = 17846560482454.30745852273604315188195970323350694444444444444... so a(9) = 1.
		

Crossrefs

Programs

  • Mathematica
    Primorial[n_] := Times @@ Prime[Range[n]]
    ClearAll[iter]
    ClearAll[fracPer, vp];
    (*p-adic order*)
    vp[p_?PrimeQ, n_Integer] :=
      Length@NestWhileList[#/p &, n/p, IntegerQ] - 1;
    (*fraction decimal expansion period*)
    fracPer[q_Integer] := 0;
    fracPer[q_Rational] := Module[{den, p2, p5}, den = Denominator[q];
       p2 = vp[2, den];
       p5 = vp[5, den];
       den = den/2^p2/5^p5;
       If[den == 1, 0, MultiplicativeOrder[10, den]]];
    iter[{periods_, frac_, n_}] := {{periods, fracPer[#]}, #, n + 1} &[
       frac*Primorial[n]/EulerPhi[Primorial[Max[1, n - 1]]]];
    Flatten@First@
      Nest[iter, {0, Primorial[0]/EulerPhi[Primorial[0]], 0}, 50]

A329109 Numbers k such that 1/k and 1/(k+1) have repeating non-terminating decimal representations with the same length.

Original entry on oeis.org

13, 77, 104, 158, 259, 350, 397, 1095, 1213, 1453, 1687, 1924, 2079, 2169, 2426, 2427, 2557, 2794, 2797, 3517, 3653, 3733, 4081, 4441, 4803, 5077, 5423, 5437, 6037, 6083, 6133, 6638, 7323, 7933, 8127, 9268, 9393
Offset: 1

Views

Author

Jud McCranie, Nov 04 2019

Keywords

Comments

These are numbers k such that A051626(k) = A051626(k+1) > 0.

Examples

			1/13 and 1/14 both repeat with period 6, so 13 is in the sequence.
		

Crossrefs

Cf. A051626.

A338753 Number of integers less than n with the same period of reciprocal as n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Nov 06 2020

Keywords

Examples

			a(14) = 2 because A051626(14) = 6 and also A051626(7) = A051626(13) = 6.
More specifically,
1/7  = 0.142857(142857)...  (period 6),
1/13 = 0.076923(076923)...  (period 6),
1/14 = 0.0714285(714285)... (period 6).
		

Crossrefs

Cf. A051626.

Programs

  • Mathematica
    Table[Length[Select[Range[n - 1], Length[RealDigits[1/#][[1, -1]]] == Length[RealDigits[1/n][[1, -1]]] &]], {n, 90}]

Formula

a(n) = |{j < n : A051626(j) = A051626(n)}|.

A351912 Period of binary representation of 1/n, or 0 if 1/n terminates.

Original entry on oeis.org

0, 0, 2, 0, 4, 2, 3, 0, 6, 4, 10, 2, 12, 3, 4, 0, 8, 6, 18, 4, 6, 10, 11, 2, 20, 12, 18, 3, 28, 4, 5, 0, 10, 8, 12, 6, 36, 18, 12, 4, 20, 6, 14, 10, 12, 11, 23, 2, 21, 20, 8, 12, 52, 18, 20, 3, 18, 28, 58, 4, 60, 5, 6, 0, 12, 10, 66, 8, 22, 12, 35, 6, 9, 36, 20, 18, 30, 12, 39, 4, 54, 20, 82, 6
Offset: 1

Views

Author

Herbert Eberle, Mar 15 2022

Keywords

Comments

The difference from A007733 is that if n is a power of 2 this sequence has 0, whereas A007733(2^n) = 1.

Crossrefs

Cf. A007733, which is the main entry for this problem.
Cf. A242595.
Cf. A249772 (base 6), A051626 (decimal), A246004 (base 12).

A384869 For n >= 1, a(n) = Sum_{k = 1..n} gcd(n, floor((n/k)*10^x)), where x = A121341(k/gcd(n,k)).

Original entry on oeis.org

1, 3, 7, 8, 17, 21, 31, 27, 53, 33, 71, 58, 85, 74, 103, 75, 129, 118, 145, 70, 209, 141, 199, 146, 197, 194, 309, 191, 281, 175, 301, 206, 427, 271, 339, 297, 397, 306, 503, 157, 481, 432, 505, 336, 559, 395, 553, 388, 607, 303, 777, 454, 677, 620, 605, 467
Offset: 1

Views

Author

Ctibor O. Zizka, Jun 11 2025

Keywords

Comments

a(n) < n^2 - n + 1.

Examples

			For n = 12:
k = 4, x = A121341(4/gcd(12,4)) = 0, gcd(12, floor((12/4)*10^0)) = 3;
k = 5, x = A121341(5/gcd(12,5)) = 1, gcd(12, floor((12/5)*10^1)) = 12;
and so on.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Max[IntegerExponent[n, 2], IntegerExponent[n, 5]] + Length[RealDigits[1/n][[1, -1]]]; a[n_] := Sum[GCD[n, Floor[(n/k)*10^f[k/GCD[n, k]]]], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Jun 19 2025 *)
Previous Showing 31-39 of 39 results.