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.

Showing 1-10 of 15 results. Next

A046108 Decimal period of 1/b(n), where b(n) is A046107.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 11, 12, 13, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23, 24, 25, 25, 25, 26, 26, 27, 27, 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 32, 33, 33, 34, 34, 34, 35, 35
Offset: 1

Views

Author

Keywords

Crossrefs

A007138 Smallest primitive factor of 10^n - 1. Also smallest prime p such that 1/p has repeating decimal expansion of period n.

Original entry on oeis.org

3, 11, 37, 101, 41, 7, 239, 73, 333667, 9091, 21649, 9901, 53, 909091, 31, 17, 2071723, 19, 1111111111111111111, 3541, 43, 23, 11111111111111111111111, 99990001, 21401, 859, 757, 29, 3191, 211, 2791, 353, 67, 103, 71, 999999000001, 2028119, 909090909090909091
Offset: 1

Views

Author

Keywords

Comments

In the 18th century, the Japanese mathematician Ajima Naonobu (a.k.a. Ajima Chokuyen) gave the first 16 terms (Smith and Mikami, p. 199). - Jonathan Sondow, May 25 2013
Also the least prime number p such that the multiplicative order of 10 modulo p is n. - Robert G. Wilson v, Dec 09 2013
n always divides p-1. - Jon Perry, Nov 02 2014

Examples

			a(3) = 37 since 1/37 = 0.027027... has period 3, and 37 is the smallest such prime (in fact, the only one).
		

References

  • Ajima Naonobu (aka Ajima Chokuyen), Fujin Isshũ (Periods of Decimal Fractions).
  • J. Brillhart et al., Factorizations of b^n +/- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of A046107.
Cf. A001913.
Cf. A112927 (base 2), A143663 (base 3), A112092 (base 4), A143665 (base 5), A379639 (base 6), A379640 (base 7), A379641 (base 8), A379642 (base 9), A007138 (base 10), A379644 (base 11), A252170 (base 12).

Programs

  • Maple
    S:= {}:
    for n from 1 to 60 do
      F:= numtheory:-factorset(10^n-1) minus S;
      A[n]:= min(F);
      S:= S union F;
    od:
    seq(A[n],n=1..60); # Robert Israel, Nov 10 2014
  • Mathematica
    s={}; Reap[Scan[(x=Complement[FactorInteger[10^#-1][[All,1]],s]; Sow[Min[x]]; s=Union[s,x])&,Range@60]][[2,1]] (* Shenghui Yang, Apr 15 2025 *)

Extensions

b-file truncated to 364 terms as a(365) was wrong and is currently unknown (pointed by Eric Chen), and a-file revised by Max Alekseyev, Apr 26 2022

A057951 Number of prime factors of 10^n - 1 (counted with multiplicity).

Original entry on oeis.org

2, 3, 4, 4, 4, 7, 4, 6, 6, 6, 4, 9, 5, 6, 8, 8, 4, 11, 3, 9, 9, 9, 3, 12, 7, 8, 9, 10, 7, 15, 5, 13, 8, 8, 9, 14, 5, 5, 8, 13, 6, 17, 6, 13, 12, 8, 4, 15, 6, 12, 10, 11, 6, 16, 10, 14, 8, 10, 4, 22, 9, 7, 16, 17, 9, 17, 5, 12, 8, 14, 4, 20, 5, 9, 14, 8, 10, 18
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2000

Keywords

Crossrefs

bigomega(b^n-1): this sequence (b=10), A057952 (b=9), A057953 (b=8), A057954 (b=7), A057955 (b=6), A057956 (b=5), A057957 (b=4), A057958 (b=3), A046051 (b=2).

Programs

Formula

Mobius transform of A085035 - T. D. Noe, Jun 19 2003
a(n) = Omega(10^n -1) = Omega(R_n) + 2 = A046053(n) + 2 {where Omega(n) = A001222(n) and R_n = (10^n - 1)/9 = A002275(n)}. - Lekraj Beedassy, Jun 09 2006
a(n) = A001222(A002283(n)). - Ray Chandler, Apr 22 2017

Extensions

Erroneous b-file replaced by Ray Chandler, Apr 26 2017

A072982 Primes p for which the period of 1/p is a power of 2.

Original entry on oeis.org

3, 11, 17, 73, 101, 137, 257, 353, 449, 641, 1409, 10753, 15361, 19841, 65537, 69857, 453377, 976193, 1514497, 5767169, 5882353, 6187457, 8253953, 8257537, 70254593, 167772161, 175636481, 302078977, 458924033, 639631361, 1265011073
Offset: 1

Views

Author

Benoit Cloitre, Jul 26 2002

Keywords

Comments

All Fermat primes > 5 (A019434) are in the sequence, since it can be shown that the period of 1/(2^(2^n)+1) is 2^(2^n) whenever 2^(2^n)+1 is prime. - Benoit Cloitre, Jun 13 2007
Take all the terms from row 2^k of triangle in A046107 for k >= 0 and sort to arrive at this sequence. - Ray Chandler, Nov 04 2011
Additional terms, but not necessarily the next in sequence: 13462517317633 has period 1048576 = 2^20; 46179488366593 has period 2199023255552 = 2^41; 101702694862849 has period 8388608 = 2^23; 171523813933057 has period 4398046511104 = 2^42; 505775348776961 has period 2199023255552 = 2^41; 834427406578561 has period 64 = 2^6 - Ray Chandler, Nov 09 2011
Furthermore (excluding the initial term 3) this sequence is also the ascending sequence of primes dividing 10^(2^k)+1 for some nonnegative integer k. For a prime dividing 10^(2^k)+1, the period of 1/p is 2^(k+1). Thus for the prime p = 558711876337536212257947750090161313464308422534640474631571587847325442162307811\
65223702155223678309562822667655169, a factor of 10^(2^7)+1, the period of 1/p is only 2^8. This large prime then also belongs to the sequence. - Christopher J. Smyth, Mar 13 2014
For any m, every term that is not a factor of 10^(2^k)-1 for some k < m is congruent to 1 (mod 2^m). Thus all terms except 3, 11, 17, 73, 101, 137, 353, 449, 69857, 976193, 5882353, 6187457 are congruent to 1 (mod 128). - Robert Israel, Jun 17 2016
Additional terms listed earlier confirmed as next terms in sequence. - Arkadiusz Wesolowski, Jun 17 2016

Examples

			15361 has a period of 256 = 2^8, hence 15361 is in the sequence.
		

Crossrefs

Cf. A197224 (power of 2 which is the period of the decimal 1/a(n)).

Programs

  • Maple
    filter:= proc(p) local k;
      if not isprime(p) then return false fi;
      k:=igcd(p-1,2^ilog2(p));
      evalb(10 &^ k mod p = 1)
    end proc:
    r:= select(`<=`,`union`(seq(numtheory:-factorset(10^(2^k)-1),k=1..6)),10^9):
    b:= select(filter, {seq(i,i=129..10^9,128)}):
    sort(convert(r union b, list)); # Robert Israel, Jun 17 2016
  • Mathematica
    Do[ If[ IntegerQ[ Log[2, Length[ RealDigits[ 1/Prime[n]] [[1, 1]]]]], Print[ Prime[n]]], {n, 1, 47500}] (* Robert G. Wilson v, May 09 2007 *)
    pmax = 10^10; p = 1; While[p < pmax,p = NextPrime[p];If[ IntegerQ[Log[2, MultiplicativeOrder[10, p] ] ], Print[ p];];]; (* Ray Chandler, May 14 2007 *)
  • PARI
    select( {is_A072982(p)=if(p>5, 1<M. F. Hasler, Nov 18 2024
    
  • Python
    from itertools import count, islice
    from sympy import prime, n_order
    def A072982_gen(): return (p for p in (prime(n) for n in count(2)) if p != 5 and bin(n_order(10,p))[2:].rstrip('0') == '1')
    A072982_list = list(islice(A072982_gen(),10)) # Chai Wah Wu, Feb 07 2022
    
  • Python
    from sympy import primerange, n_order
    A072982_upto = lambda N=1e5: [p for p in primerange(3, N) if p != 5 and n_order(10, p).bit_count() == 1] # or (...) to get a generator. - M. F. Hasler, Nov 19 2024

Extensions

Edited by Robert G. Wilson v, Aug 20 2002
a(18) from Ray Chandler, May 02 2007
a(19) from Robert G. Wilson v, May 09 2007
a(20)-a(32) from Ray Chandler, May 14 2007
Deleted an unsatisfactory PARI program. - N. J. A. Sloane, Nov 19 2024

A061075 Greatest prime number p(n) with decimal fraction period of length n.

Original entry on oeis.org

3, 11, 37, 101, 271, 13, 4649, 137, 333667, 9091, 513239, 9901, 265371653, 909091, 2906161, 5882353, 5363222357, 52579, 1111111111111111111, 27961, 10838689, 8779, 11111111111111111111111, 99990001, 182521213001, 1058313049, 440334654777631, 121499449, 77843839397
Offset: 1

Views

Author

Heiner Muller-Merbach (hmm(AT)sozwi.uni-kl.de), May 29 2001

Keywords

Examples

			1/271 = 0.0036900369, period of n=5 for p(5)=271.
		

Crossrefs

Last terms in rows of A046107.

Programs

  • Mathematica
    a[n_] := Cyclotomic[n, 10] // FactorInteger // Last // First; Table[a[n], {n, 1, 26}] (* Jean-François Alcover, Aug 05 2013, after Pari *)
  • PARI
    a(n) = my(p); if(n<1, 0, p=factor(polcyclo(n,10))[,1]; p[#p])

Formula

a(n) = A006530(A019328(n)). - Ray Chandler, May 10 2017

Extensions

Terms to a(322) in b-file from Ray Chandler, Apr 28 2017
a(323)-a(352) in b-file from Max Alekseyev, Apr 26 2022

A102146 a(n) = sigma(10^n - 1), where sigma(n) is the sum of positive divisors of n.

Original entry on oeis.org

13, 156, 1520, 15912, 148512, 2042880, 14508000, 162493344, 1534205464, 16203253248, 144451398000, 2063316971520, 14903272088640, 158269280832000, 1614847741624320, 17205180696931968, 144444514193267496
Offset: 1

Views

Author

Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), Feb 14 2005

Keywords

Crossrefs

Programs

  • Mathematica
    DivisorSigma[1,10^Range[20]-1] (* Harvey P. Dale, Jan 05 2012 *)
  • PARI
    a(n) = sigma(10^n-1); \\ Michel Marcus, Apr 22 2017

Formula

a(n) = A000203(A002283(n)). - Ray Chandler, Apr 22 2017

A112505 Number of primitive prime factors of 10^n-1.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 3, 1, 2, 2, 2, 2, 1, 2, 3, 3, 1, 1, 3, 2, 2, 3, 5, 3, 3, 5, 2, 3, 3, 1, 3, 1, 1, 2, 4, 3, 4, 3, 2, 4, 2, 1, 2, 3, 4, 2, 4, 2, 4, 2, 3, 2, 2, 3, 7, 1, 5, 4, 2, 2, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 4, 4, 6, 2, 5, 2, 3, 2, 3, 3, 3, 2, 5, 3, 7, 3, 1, 3, 5, 4, 3, 2, 4, 4
Offset: 1

Views

Author

T. D. Noe, Sep 08 2005

Keywords

Comments

Also the number of primes whose reciprocal is a repeating decimal of length n. The number of numbers in each row of table A046107.
By Zsigmondy's theorem, a(n) >= 1. When a(n)=1, the corresponding prime is called a unique prime (see A007498, A040017 and A051627).

Crossrefs

Cf. A007138 (smallest primitive prime factor of 10^n-1), A102347 (number of distinct prime factors of 10^n-1), A046107.

Programs

  • Mathematica
    pp={}; Table[f=Transpose[FactorInteger[10^n-1]][[1]]; p=Complement[f, pp]; pp=Union[pp, p]; Length[p], {n, 66}]

Extensions

Terms to a(276) in b-file from T. D. Noe, Jun 01 2010
a(277)-a(322) in b-file from Ray Chandler, May 01 2017
a(323)-a(352) in b-file from Max Alekseyev, Apr 28 2022

A106305 Divisors of 10^14 - 1.

Original entry on oeis.org

1, 3, 9, 11, 33, 99, 239, 717, 2151, 2629, 4649, 7887, 13947, 23661, 41841, 51139, 153417, 460251, 909091, 1111111, 2727273, 3333333, 8181819, 9999999, 10000001, 12222221, 30000003, 36666663, 90000009, 109999989, 217272749, 651818247
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Oct 12 2005

Keywords

Crossrefs

Programs

Formula

10^14 - 1 = 3^2 * 11 * 239 * 4649 * 909091 = 99999999999999. - Alonso del Arte, Nov 09 2017

A109933 Divisors of 10^13 - 1.

Original entry on oeis.org

1, 3, 9, 53, 79, 159, 237, 477, 711, 4187, 12561, 37683, 265371653, 796114959, 2388344877, 14064697609, 20964360587, 42194092827, 62893081761, 126582278481, 188679245283, 1111111111111, 3333333333333, 9999999999999
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Oct 11 2005

Keywords

Crossrefs

Programs

A187614 Primes p such that the decimal representation of 1/p does not contain every digit 0-9.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 31, 37, 41, 43, 67, 73, 79, 101, 137, 239, 271, 353, 449, 757, 859, 1933, 4649, 8779, 9091, 9901, 21401, 21649, 25601, 27961, 52579, 62003, 123551, 333667, 513239, 538987, 909091, 1676321, 2071723, 2906161, 5882353, 10838689, 35121409, 52986961, 99990001, 265371653, 1056689261, 1058313049, 1360682471
Offset: 1

Views

Author

Michel Lagneau, Mar 12 2011

Keywords

Comments

Every repunit prime (A004022) is here. There are 113 terms of A046107, having periods of up to 256, that are here. The only known unique-period prime (A007615) not here is the one having period 92092. Is this sequence finite? - T. D. Noe, Mar 13 2011

Examples

			4649 is in the sequence because 1/4649 = 0.00021510002151000215.... contain
  only the digits 0, 1, 2 and 5.
		

Crossrefs

Cf. A187372.
Cf. A352023 (does not contain digit 9)

Programs

  • Mathematica
    Join[{2, 3, 5}, Select[Prime[Range[4, 10000]], Length[Union[RealDigits[1/#][[1, 1]]]] < 10 &]]
  • Python
    from sympy import n_order, nextprime
    from itertools import islice
    def A187614_gen(): # generator of terms
        yield from (2,3,5)
        p = 7
        while True:
            if len(set('0'+str(10**(n_order(10, p))//p))) < 10:
                yield p
            p = nextprime(p)
    A187614_list = list(islice(A187614_gen(),20)) # Chai Wah Wu, Mar 03 2022

Extensions

Extended by T. D. Noe, Mar 12 2011
Showing 1-10 of 15 results. Next