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 51-60 of 64 results. Next

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 & ]

A122060 Position in decimal expansion of 1/n where repetition begins.

Original entry on oeis.org

2, 3, 2, 4, 3, 3, 7, 5, 2, 3, 3, 4, 7, 8, 3, 6, 17, 3, 19, 4, 7, 4, 23, 5, 4, 8, 4, 11, 29, 3
Offset: 1

Views

Author

Ben Paul Thurston, Sep 14 2006

Keywords

Comments

If 1/n = 0.XYYYYY... then sequence gives index of first digit of the second Y.
a(4) = 4 and a(p) = p for primes p = {7, 17, 19, 23, 29, 47, 59, 61, 97, ...} = A001913(n) Cyclic numbers: primes with primitive root 10. - Alexander Adamchuk, Jan 28 2007

Examples

			a(4) = 4 because in 0.2500 the zero begins repeating at the fourth position.
a(17) = 17 because 0.05882352941176470588... begins repeating at the 17th position.
		

Crossrefs

Formula

a(n)=A121341(n)+2 if 1/n terminates, else a(n)=A121341(n)+1. - R. J. Mathar, Sep 20 2006

A122183 Primes p_i by index i for which the period length of 1/p_i is a semiprime.

Original entry on oeis.org

4, 6, 9, 11, 14, 15, 17, 19, 20, 26, 27, 34, 39, 41, 43, 56, 59, 61, 62, 64, 76, 83, 85, 86, 96, 101, 102, 109, 111, 112, 119, 124, 138, 140, 144, 147, 149, 150, 154, 161, 166, 168, 170, 171, 175, 192, 198, 203, 216, 219, 222, 224, 225, 235, 236, 239, 240, 246, 251
Offset: 1

Views

Author

Jonathan Vos Post, May 10 2007

Keywords

Comments

Semiprime analog of A072859 based on A002371.
Numbers n such that A002371(n) is an element of A001358.

Examples

			a(1) = 4 because A002371(4) Period of decimal expansion of 1/(4th prime) = 6 = 2*3, a semiprime.
a(2) = 6 because A002371(6) = 6 = 2*3.
a(3) = 9 because A002371(9) = 22 = 2*11.
a(4) = 11 because A002371(11) = 15 = 3*5.
a(5) = 14 because A002371(14) = 21 = 3*7.
a(6) = 15 because A002371(15) = 46 = 2*23.
a(7) = 17 because A002371(17) = 58 = 2*29.
		

Crossrefs

Programs

  • Mathematica
    semiprimeQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; PrimePi /@ Select[Prime@ Range@ 254, semiprimeQ@ MultiplicativeOrder[10, # ] &] (* Robert G. Wilson v *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, May 22 2007

A212528 The periodic part of the decimal expansion of prime(n-1) / prime(n).

Original entry on oeis.org

6, 0, 714285, 63, 846153, 7647058823529411, 894736842105263157, 8260869565217391304347, 7931034482758620689655172413, 935483870967741, 837, 90243, 953488372093023255813, 9148936170212765957446808510638297872340425531, 8867924528301
Offset: 2

Views

Author

Jaroslav Krizek, Jun 29 2012

Keywords

Comments

Number of digits of the periodic parts for n>=3 in A002371, A048595 and A071126.

Crossrefs

Programs

  • Mathematica
    Table[If[n == 3, 0, FromDigits[RealDigits[Prime[n-1]/Prime[n]][[1,1]]]], {n, 2, 10}]

Extensions

Corrected by T. D. Noe, Jun 29 2012

A227969 Powers of primes other than 2 and 5 in order by cycle length of reciprocal in decimal.

Original entry on oeis.org

3, 9, 11, 27, 37, 101, 41, 271, 7, 13, 239, 4649, 73, 137, 81, 333667, 9091, 21649, 513239, 9901, 53, 79, 265371653, 909091, 31, 2906161, 17, 5882353, 2071723, 5363222357, 19, 52579, 1111111111111111111, 3541, 27961, 43, 1933, 10838689, 23, 121, 4093, 8779, 11111111111111111111111
Offset: 1

Views

Author

J. Lowell, Aug 01 2013

Keywords

Examples

			3 and 9 qualify for the first 2 terms because both of them have a reciprocal cycle of 1. Then 11 has a reciprocal cycle of 2; then 27 and 37 have 3; then 101 has 4; then 41 and 271 have 5. Table begins:
3, 9;
11;
27, 37;
101;
41, 271;
7, 13;
239, 4649;
73, 137;
81, 333667;
9091;
21649, 513239;
9901;
53, 79, 265371653;
		

Crossrefs

Programs

  • PARI
    go(n)=my(v=[],P=[],E=[],t,ok); for(k=1,n, t=setminus(factor(10^k-1)[,1]~,P); E=concat(E,vector(#t,i,1)); P=concat(P,t); E=apply(i->E[i],Vec(vecsort(P,,1))); P=vecsort(P); ok=1; while(ok, ok=0; for(i=1,#P,if(znorder(Mod(10,P[i]^(E[i]+1)))==k, E[i]++; t=concat(t,P[i]^E[i]); ok=1))); v=concat(v,t=vecsort(t)); print(k" "t)); v \\ Charles R Greathouse IV, Aug 01 2013

Extensions

a(9)-a(43) from Charles R Greathouse IV, Aug 01 2013

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

A060263 a(n) = smallest prime q such that precisely n successive primes p starting at q have reciprocals with period p-1 and prevprime(q) is not such a prime.

Original entry on oeis.org

59, 257, 17, 487, 5737, 23459, 364379, 681899, 4275343, 14747137, 12284017, 61598897, 62232899, 95386019, 824443051, 2245849783
Offset: 2

Views

Author

Jeff Burch, Mar 23 2001

Keywords

Crossrefs

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 21 2003
a(6) onward corrected and title clarified by Sean A. Irvine, Nov 05 2022

A172372 Least number k such that the n-th prime not dividing 10 (A004139(n)) divides the repunit (10^k-1)/9.

Original entry on oeis.org

3, 6, 2, 6, 16, 18, 22, 28, 15, 3, 5, 21, 46, 13, 58, 60, 33, 35, 8, 13, 41, 44, 96, 4, 34, 53, 108, 112, 42, 130, 8, 46, 148, 75, 78, 81, 166, 43, 178, 180, 95, 192, 98, 99, 30, 222, 113, 228, 232, 7, 30, 50, 256, 262, 268, 5, 69, 28, 141, 146, 153, 155, 312, 79, 110
Offset: 1

Views

Author

Michel Lagneau, Feb 01 2010

Keywords

Comments

If p is an odd prime different from 5, then p divides an infinite number of terms of the sequence of repunits {1, 11, 111, 1111, ... }. The proof is elementary: let p be such a prime. If p = 3, then 3 divides (10^3-1)/9 = 111. Otherwise, take k = (10^p - 1)/9; by the Fermat theorem, 10^(p-1) == 1 (mod p), so p divides (10^(p-1)-1); since p is relatively prime to 9, it divides k. Trivially, if p divides any k digit repunit, it divides the k*m digit repunit as well.
Essentially the same as A002371. - T. D. Noe, Apr 11 2012

Examples

			3 divides 111, but not 1 or 11, so a(1) = 3.
7 divides 111111 but not 1, 11, 111, 1111, or 11111, so a(2) = 6.
		

References

  • David Wells, The Factors of the Repunits 11 through R_40, The Penguin Dictionary of Curious and Interesting Numbers, p. 219 Penguin 1986.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1997.
  • David Wells, Curious and Interesting Numbers (Revised), Penguin Books, page 114.

Crossrefs

Cf. A002275 (repunits), A002371 (period of decimal expansion of 1/prime(n)), A004139 (odd primes excluding 5), A095250 (11111111... (n times) mod n).

Programs

  • PARI
    a(n) = {k=1; p = if(n>1, prime(n+2), 3); while((10^k-1)/9 % p, k++); k;} \\ Michel Marcus, May 25 2014

Extensions

Corrected and edited by Michel Lagneau, Apr 25 2010
Term 6 between terms 44 and 96 doesn't belong to the sequence. The same for term 43 between terms 43 and 178. Corrected and edited by Krzysztof Wojtas, May 25 2014

A247585 Period of the decimal expansion of 1/p as p runs through the prime numbers of the form n^2+1 (0 by convention for the primes 2 and 5).

Original entry on oeis.org

0, 0, 16, 3, 4, 98, 256, 200, 576, 338, 1296, 200, 1458, 3136, 242, 1369, 7056, 1620, 4418, 12100, 13456, 3600, 15376, 567, 3380, 8978, 10658, 7500, 24336, 25, 5780, 30976, 600, 33856, 41616, 10609, 44100, 50176, 52900, 55696, 14400, 62500, 65536, 33800, 69696, 8100
Offset: 1

Views

Author

Michel Lagneau, Sep 20 2014

Keywords

Comments

Subsequence of A002371 or period of the decimal expansion of 1/A002496(n).
The squares > 0 in the sequence are 4, 16, 25, 256, 576, 1296, 1369, 3136, 3600, 7056, 8100, 10609, ...

Examples

			a(3) = 16 because A002496(3) = 17 and 1/17 = 0. 0588235294117647 0588235294117647 ... has period 16.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[n^2+1],AppendTo[lst,n^2+1]],{n,1,1000}];Table[Length[RealDigits[1/lst[[m]]][[1,1]]],{m,1,60}]

Formula

a(n) = A002371(A000720(A002496(n))). [Corrected by Georg Fischer, Oct 19 2024]

A338792 a(n) is the least number k such that 1/prime(k) has repeating decimal expansion of period n.

Original entry on oeis.org

1, 2, 5, 12, 26, 13, 4, 52, 21, 28693, 1128, 2431, 1221, 16, 71954, 11, 7, 153888, 8, 27417323062119920, 496, 14, 9, 223378173194137397198, 5760923, 2403, 149, 134, 10, 452, 47, 406, 71, 19, 27, 20, 37607875619, 150886, 22544062111497849
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 09 2020

Keywords

Examples

			1/prime(1)  = 1/2  = 0.5 (finite decimal expansion).
1/prime(2)  = 1/3  = 0.3(3)... (period 1).
1/prime(5)  = 1/11 = 0.09(09)... (period 2).
1/prime(12) = 1/37 = 0.027(027)... (period 3).
		

Crossrefs

Formula

a(0) = 1; a(n) = A000720(A007138(n)).

Extensions

a(19)-a(38) from Daniel Suteu, Nov 09 2020 [using data from A007138 and A234317]
Previous Showing 51-60 of 64 results. Next