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

A259299 The decimal expansion of n/(n+1) until it terminates or repeats, shown without the decimal point.

Original entry on oeis.org

0, 5, 6, 75, 8, 83, 857142, 875, 8, 9, 90, 916, 923076, 9285714, 93, 9375, 9411764705882352, 94, 947368421052631578, 95, 952380, 954, 9565217391304347826086, 9583, 96, 9615384, 962, 96428571, 9655172413793103448275862068, 96, 967741935483870, 96875, 96, 97058823529411764, 9714285, 972, 972
Offset: 0

Views

Author

Doug Bell, Jun 23 2015

Keywords

Comments

The first occurrence of a repeated term where a(n) = a(n+1) is for a(35) and a(36), both of which equal 972. This results from two different repeating decimals with different length repeating periods but the same non-repeating plus repeating digits, namely 35/36 = .972222... = 972 (repeating period of 1) and 36/37 = .972972... = 972 (repeating period of 3).
Other than n = (36,37) the only repeated terms appear to follow one of the following two patterns for the larger value of n:
First pattern: for n >= 111, where all digits of n are 1: 111, 1111, 11111, ... and a(n-1) = a(n) = 990, 9990, 99990, ... with the repeating decimal for ((n-1)/n, n/(n+1)) of (.9909090..., .990990990...), (.9990990990..., .999099909990...), (.9999099909990..., .999909999099990...). Where d is the number of digits in a(n), the repeating period for the decimal values is (d-1, d).
Second pattern: for n >= 10101, where the digits of n alternate between 0 and 1, with a final digit of 1: 10101, 1010101, 101010101, ... and a(n-1) = a(n) = 999900, 9999900, 99999900, ... with the repeating decimal for ((n-1)/n, n/(n+1)) of (.99990099009900..., .999900999900999900...), (.99999009990099900..., .999990099999009999900...), (.99999900999900999900..., .999999009999990099999900...). Where d is the number of digits in a(n), the repeating period for the decimal values is (d-2, d).
Have verified that there are no other repeating terms up to n = 10^6.

Examples

			a(1)=5 (1/2=0.5), a(2)=6 (2/3=0.6666...=6), a(3)=75 (3/4=0.75=75).
		

Crossrefs

Subsequences A156703, A235589.

Programs

  • Mathematica
    Array[FromDigits@ Flatten@ First@ RealDigits[(# - 1)/#] &, 37] (* Michael De Vlieger, Aug 18 2015 *)

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

A061564 Numbers k such that the repeating part of the decimal expansion of 1/k (omitting leading or trailing zeros) forms a prime number.

Original entry on oeis.org

3, 12, 18, 27, 30, 33, 36, 45, 48, 75, 120, 180, 192, 198, 270, 288, 300, 330, 333, 360, 369, 450, 480, 495, 750, 768, 909, 1152, 1200, 1584, 1800, 1875, 1920, 1980, 1998, 2151, 2304, 2439, 2700, 2880, 2997, 3000, 3072, 3300, 3330, 3333, 3600, 3690, 4500, 4800
Offset: 1

Views

Author

Brian Wallace (wallacebrianedward(AT)yahoo.co.uk), May 18 2001

Keywords

Examples

			1/18 = 0.05555555..., the repeating part is 5, so 18 is in the sequence.
277 is not a term because the repetend of 1/277 is 3610108303249097472924187725631768953068592057761732851985559566787, which is not a prime. - _Barry Smyth_, Mar 31 2022
		

Crossrefs

Extensions

Corrected and extended by Klaus Brockhaus, May 19 2001
More terms from Lior Manor, Nov 26 2001
Incorrect term 277 removed by Barry Smyth, Mar 31 2022
Corrected and extended by Sean A. Irvine, Feb 25 2023

A175557 Prime preperiodic part of the decimal expansion of 1/k as k runs through A065502.

Original entry on oeis.org

5, 2, 5, 41, 3, 2, 2, 2, 17, 13, 11, 89, 7, 5, 5, 5, 41, 3, 3, 347, 3, 3, 3, 29, 2, 2, 2, 2, 26041, 2, 2, 2, 23, 2, 2, 2, 2, 2, 17, 13, 13, 1201, 11, 11, 107, 919, 89, 7, 7, 7, 7, 7, 7, 61, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 41, 4111, 3
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2010

Keywords

Comments

Primes in A175555 in the order of appearance.
Multiples of 2 or 5 generate a quotient with a preperiodic sequence of digits, for example 1/24 = 0.041666666..., and 41 is the decimal form of the preperiodic part.
The corresponding values of n are: 2, 5, 20, 24, 28, 36, 44, 50, 56, 72, 88, 112, 136, 168, 184, ...

Examples

			The prime 347 is in the sequence because 1/288 = .00347222222222222222...
The prime 1201 is in the sequence because 1/832 =.001201 923076 923076 ...
		

References

  • H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, 'Die periodischen Dezimalbrueche'.

Crossrefs

Programs

  • Maple
    for n from 1 do
        p := A175555(n) ;
        if isprime(p) then
            print(p) ;
        end if;
    end do: # R. J. Mathar, Jul 22 2012

A212720 The periodic part of the decimal expansion of n/(n+1). Any initial 0's are to be placed at end of cycle.

Original entry on oeis.org

0, 6, 0, 0, 3, 857142, 0, 8, 0, 90, 6, 923076, 285714, 3, 0, 9411764705882352, 4, 947368421052631578, 0, 952380, 54, 9565217391304347826086, 3, 0, 615384, 962, 428571, 9655172413793103448275862068, 6, 967741935483870, 0, 96, 7058823529411764, 714285, 2, 972
Offset: 1

Views

Author

Jaroslav Krizek, Jun 01 2012

Keywords

Examples

			6/7 = 0.85714285714285714285714285714286... and digit-cycle is 857142, so a(6) = 857142.
		

Crossrefs

Cf. A036275 (periodic part of the decimal expansion of 1/n), A158911 (numbers n such that a(n)=0), A051037.

Programs

  • Mathematica
    Table[FromDigits[FindTransientRepeat[RealDigits[n/(n+1),10,100][[1]],3][[2]]],{n,40}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 07 2017 *)

A235589 The periodic part of the decimal expansion of m/(m+1), for those m/(m+1) that have pure periods.

Original entry on oeis.org

6, 857142, 8, 90, 923076, 9411764705882352, 947368421052631578, 952380, 9565217391304347826086, 962, 9655172413793103448275862068, 967741935483870, 96, 972, 974358, 97560, 976744186046511627906, 9787234042553191489361702127659574468085106382, 979591836734693877551020408163265306122448
Offset: 1

Views

Author

Bill McEachen, Jan 12 2014

Keywords

Comments

A companion sequence stemming from the some of the elements excluded by A156703. The sequence is highly volatile and infinite...as with A156703 the subset elements are encountered in numerical order. a(n) will start with the digit 9 for n>4 I believe. Entries can grow quite large very quickly. Each entry will be encountered once, and they will end in an even digit.
The number of digits of a(n) is given by A002329. - Michel Marcus, Aug 19 2015

Examples

			1/2=0.5 non-repeating, so exclude from sequence.
2/3=0.6 repeating, so a(1)=6.
5/6=0.833 (repeating) but has "8" prefix ahead of repeating "3" so exclude from sequence (decimal expansion not purely periodic)
6/7=0.857142 repeating so a(2)=857142.
		

Crossrefs

Subsequence of A259299.

Programs

  • Mathematica
    FromDigits@ Flatten@ First@ RealDigits[(# - 1)/#] & /@ Select[Range@ 120, CoprimeQ[#, 10] &] //Rest (* Michael De Vlieger, Aug 18 2015 *)

Formula

a(n) = the periodic part of the decimal expansion of (A045572(n+1)-1) / A045572(n+1). - Doug Bell, Aug 17 2015

Extensions

Missing terms added by Ralf Stephan, Jan 19 2014
Incorrect terms 916, 94 removed and two more terms added by Michael De Vlieger, Aug 18 2015

A270392 The sum of the digits in the periodic part of the decimal expansion of 1/n.

Original entry on oeis.org

0, 0, 3, 0, 0, 6, 27, 0, 1, 0, 9, 3, 27, 27, 6, 0, 72, 5, 81, 0, 27, 9, 99, 6, 0, 27, 10, 27, 126, 3, 54, 0, 3, 72, 27, 7, 9, 81, 18, 0, 18, 27, 90, 9, 2, 99, 207, 3, 189, 0, 69, 27, 63, 14, 9, 27, 81, 126, 261, 6, 270, 54, 24, 0, 27, 6, 144, 72, 96, 27, 126, 8, 36, 9, 3, 81, 27, 18, 54, 0, 37, 18, 171, 27, 72, 99, 123, 9
Offset: 1

Views

Author

Neville Styles, Mar 16 2016

Keywords

Comments

It appears that all nonzero terms in this sequence are divisible by 3 unless n is divisible by 9.

Examples

			1/7 = 0.142857142857142857... and digit-cycle is 142857, the sum of these integers is 27 so a(7)=27.
		

Crossrefs

Cf. A036275.

Programs

  • Mathematica
    a[n_] := Block[{d = RealDigits[1/n][[1,-1]]}, If[ IntegerQ@d, 0, Plus @@ d]]; Array[a, 100] (* Giovanni Resta, May 15 2016 *)

Formula

a(n) = A007953(A036275(n)).

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

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

A373407 Smallest positive integer k such that no more than n numbers (formed by multiplying k by a digit) are anagrams of k, or -1 if no such number exists.

Original entry on oeis.org

1, 1035, 123876, 1402857, 1037520684, 142857
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 04 2024

Keywords

Comments

For n = 2..6 all terms are divisible by 9.
For n >= 4, a(n) must be divisible by 9, or a(n) = -1, because all anagrams d*k of k for d = 2, 3, 5, 6, 8 and 9 are divisible by 9. Thus there are only 3 values of d, i.e., 1, 4 and 7, for which k*d must not be divisible by 9.
If a(n) exists for n > 1 then 9|a(n). Holds for n = 2 and n = 3 by inspection. Proof for n >= 4: if k*d is an anagram of k where 2 <= d <= 9 then k*d - k = k*(d-1) is a multiple of 9. For this to be true, k must be a multiple of 9 as d is not of the form 1 (mod 3) for all d. - David A. Corneth, Jun 04 2024
From Michael S. Branicky, Jun 07 2024: (Start)
The following were constructed from multiples of cyclic numbers (cf. A180340, Wikipedia):
a(6) = 142857 = (10^6 - 1) / 7;
a(7) <= 1304347826086956521739 = 3*(10^22 - 1) / 23;
a(8) <= 1176470588235294 = 2*(10^16 - 1) / 17;
a(9) <= 105263157894736842 = 2*(10^18 - 1) / 19. (End)

Examples

			a(2) = 1035, because 1035 * 1 = 1035 and 1035 * 3 = 3105 are anagrams of 1035, and no other number 1035 * i with digit i is an anagram of 1035, and no lesser number verifies this property.
Table n, k, set of multipliers.
  1   1          [1]
  2   1035       [1, 3]
  3   123876     [1, 3, 7]
  4   1402857    [1, 2, 3, 5]
  5   1037520684 [1, 2, 4, 5, 8]
  6   142857     [1, 2, 3, 4, 5, 6]
		

Crossrefs

Programs

  • PARI
    isok(k, n) = my(d=vecsort(digits(k))); sum(i=1, 9, vecsort(digits(k*i)) == d) == n; \\ Michel Marcus, Jun 04 2024
Previous Showing 11-20 of 21 results. Next