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 47 results. Next

A052983 Least multiple of n consisting of a succession of 1's followed by a succession of 0's.

Original entry on oeis.org

10, 10, 1110, 100, 10, 1110, 1111110, 1000, 1111111110, 10, 110, 11100, 1111110, 1111110, 1110, 10000, 11111111111111110, 1111111110, 1111111111111111110, 100, 1111110, 110, 11111111111111111111110, 111000, 100, 1111110, 1111111111111111111111111110
Offset: 1

Views

Author

Lekraj Beedassy, Jun 26 2003

Keywords

Comments

All entries are differences of two terms of A000042. Since the pigeonhole principle guarantees that, for any m, two among the first m+1 entries of A000042 are congruent modulo m, their difference (i.e. belonging to this sequence) is therefore divisible by m, so that such numbers exist for all m. This sequence is thus infinite.
For n>1, a(n) consists of s 1's and t 0's, where s=A084681(X) and t is the greater of p or q (s=1 for X=1, t=1 for p=q=0), when we write n=X*Y with (X,Y)=1 and Y=2^p*5^q.

Examples

			We have a(6)=1110 because 6 divides 1110=6*185, the smallest such one with a string of 1's followed by that of 0's
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Select[ Map[ FromDigits, IntegerDigits[ Table[ Sum[2^i, {i, k, j, -1}], {j, k, 1, -1}], 2]]/n, IntegerQ[ # ] & ]; g[n_] := Block[{k = 1}, While[ f[n] == {}, k++ ]; n*Min[ f[n]]]; Table[ g[n], {n, 1, 27}]
    nn=30;With[{nos=Sort[Flatten[Table[FromDigits[Join[Table[1,{n}], Table[ 0,{i}]]],{n,nn},{i,5}]]]},Flatten[Table[Select[nos,Divisible[#,n]&,1],{n,nn}]]] (* Harvey P. Dale, Mar 09 2014 *)

Formula

a(n) = A276348(n) * n; A227362(a(n)) = 10. - Jaroslav Krizek, Aug 30 2016

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 26 2003

A246004 The duodecimal period of 1/n, or 0 if 1/n terminates.

Original entry on oeis.org

0, 0, 0, 0, 4, 0, 6, 0, 0, 4, 1, 0, 2, 6, 4, 0, 16, 0, 6, 4, 6, 1, 11, 0, 20, 2, 0, 6, 4, 4, 30, 0, 1, 16, 12, 0, 9, 6, 2, 4, 40, 6, 42, 1, 4, 11, 23, 0, 42, 20, 16, 2, 52, 0, 4, 6, 6, 4, 29, 4, 15, 30, 6, 0, 4, 1, 66, 16, 11, 12, 35, 0, 36, 9, 20, 6, 6, 2, 26, 4, 0, 40, 41, 6, 16, 42, 4, 1, 8, 4, 6, 11, 30, 23, 12, 0, 16, 42, 1, 20, 100, 16, 102, 2, 12, 52, 53, 0, 54, 4, 9, 6, 112
Offset: 1

Views

Author

Eric Chen, Nov 13 2014

Keywords

Examples

			1/10 = 0.1249724972497... has period 4 in duodecimal, so a(10) = 4.
1/23 = 0.0631694842106316948421... has period 11 in duodecimal, so a(23) = 11.
		

Crossrefs

Cf. A007732, A051626 (decimal versions).
Cf. A246489.

Programs

A121090 Period of unit fractions having periodic decimal expansions.

Original entry on oeis.org

1, 1, 6, 1, 2, 1, 6, 6, 1, 16, 1, 18, 6, 2, 22, 1, 6, 3, 6, 28, 1, 15, 2, 16, 6, 1, 3, 18, 6, 5, 6, 21, 2, 1, 22, 46, 1, 42, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13, 9, 5, 41, 6, 16, 21, 28, 2, 44, 1, 6, 22, 15, 46, 18, 1, 96, 42, 2, 4, 16
Offset: 0

Views

Author

Gil Broussard, Aug 11 2006

Keywords

Comments

See A007732, which is the main entry for this sequence.

Examples

			The first unit fraction considered is 1/3 because both 1/1 and 1/2 have finite decimal expansions.
a(1) = 1 because 1/3=.33333... whose repeating portion, 3, is of length 1.
Note: 1/4 and 1/5 are skipped because their decimal expansions are finite.
a(2) = 1 because 1/6=.166666... whose repeating portion, 6, is of length 1.
a(3) = 6 because 1/7 =.142857142857... whose repeating portion, 142857, is of length 6.
		

Crossrefs

Formula

a(n) = A007732(A085837(n)). - Kevin Ryde, May 05 2023

A250211 Square array read by antidiagonals: A(m,n) = multiplicative order of m mod n, or 0 if m and n are not coprime.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2, 4, 1, 1, 0, 2, 0, 4, 0, 1, 1, 1, 0, 1, 2, 0, 3, 1, 1, 0, 1, 0, 0, 0, 6, 0, 1, 1, 1, 2, 2, 1, 2, 3, 2, 6, 1, 1, 0, 0, 0, 4, 0, 6, 0, 0, 0, 1, 1, 1, 1, 1, 4, 1, 2, 2, 3, 4, 10, 1, 1, 0, 2, 0, 2, 0, 0, 0, 6, 0, 5, 0, 1, 1, 1, 0, 2, 0, 0, 1, 2, 0, 0, 5, 0, 12, 1
Offset: 1

Views

Author

Eric Chen, Dec 29 2014

Keywords

Comments

Read by antidiagonals:
m\n 1 2 3 4 5 6 7 8 9 10 11 12 13
1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 1 0 2 0 4 0 3 0 6 0 10 0 12
3 1 1 0 2 4 0 6 2 0 4 5 0 3
4 1 0 1 0 2 0 3 0 3 0 5 0 6
5 1 1 2 1 0 2 6 2 6 0 5 2 4
6 1 0 0 0 1 0 2 0 0 0 10 0 12
7 1 1 1 2 4 1 0 2 3 4 10 2 12
8 1 0 2 0 4 0 1 0 2 0 10 0 4
9 1 1 0 1 2 0 3 1 0 2 5 0 3
10 1 0 1 0 0 0 6 0 1 0 2 0 6
11 1 1 2 2 1 2 3 2 6 1 0 2 12
12 1 0 0 0 4 0 6 0 0 0 1 0 2
13 1 1 1 1 4 1 2 2 3 4 10 1 0
etc.
A(m,n) = Least k>0 such that m^k=1 (mod n), or 0 if no such k exists.
It is easy to prove that column n has period n.
A(1,n) = 1, A(m,1) =1.
If A(m,n) differs from 0, it is period length of 1/n in base m.
The maximum number in column n is psi(n) (A002322(n)), and all numbers in column n (except 0) divide psi(n), and all factors of psi(n) are in column n.
Except the first row, every row contains all natural numbers.

Examples

			A(3,7) = 6 because:
3^0 = 1 (mod 7)
3^1 = 3 (mod 7)
3^2 = 2 (mod 7)
3^3 = 6 (mod 7)
3^4 = 4 (mod 7)
3^5 = 5 (mod 7)
3^6 = 1 (mod 7)
...
And the period is 6, so A(3,7) = 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(m,n)
      if igcd(m,n) <> 1 then 0
      elif n=1 then 1
      else numtheory:-order(m,n)
      fi
    end proc:
    seq(seq(f(t-j,j),j=1..t-1),t=2..65); # Robert Israel, Dec 30 2014
  • Mathematica
    a250211[m_, n_] = If[GCD[m, n] == 1, MultiplicativeOrder[m, n], 0]
    Table[a250211[t-j, j], {t, 2, 65}, {j, 1, t-1}]

A351396 Composite numbers d such that the period k of the decimal expansion of 1/d is > 1 and divides d-1.

Original entry on oeis.org

33, 55, 91, 99, 148, 165, 175, 246, 259, 275, 325, 370, 385, 451, 481, 495, 496, 505, 561, 592, 656, 657, 703, 715, 825, 909, 925, 1035, 1045, 1105, 1233, 1375, 1476, 1480, 1626, 1729, 1825, 1912, 2035, 2120, 2275, 2368, 2409, 2465, 2475, 2525, 2556, 2752, 2821
Offset: 1

Views

Author

Barry Smyth, Mar 24 2022

Keywords

Comments

For primes p, the period k of the decimal expansion of 1/p divides p-1. This is usually not the case for reciprocals of composites d; instead, the period k always divides phi(d) where phi is Euler's totient function (A000010). This sequence lists the composites d for which k also divides d-1, which satisfies the condition of a pseudoprime, making such composites a sequence of pseudoprimes with respect to the divisibility of d-1 by k.

Examples

			33 is a term since 1/33 = 0.030303..., its repetend is 03 so its period is 2, and 2 divides 33-1.
91 is a term since 1/91 = 0.010989010989..., its repetend is 010898 so its period is 6, and 6 divides 91-1.
925000 is a term since 1/925000 = 0.00000108108... has a repetend of 108 and a period of 3, and 3 divides 925000-1.
		

Crossrefs

Cf. A007732 (digits period), A000010 (totient).

Programs

  • Python
    from itertools import count, islice
    from sympy import n_order, multiplicity, isprime
    def A351396_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda d: not (isprime(d) or (p := n_order(10, d//2**multiplicity(2, d)//5**multiplicity(5, d))) <= 1 or (d-1) % p), count(max(startvalue,1)))
    A351396_list = list(islice(A351396_gen(),50)) # Chai Wah Wu, May 19 2022

A158248 Composite numbers with primitive root 10.

Original entry on oeis.org

49, 289, 343, 361, 529, 841, 2209, 2401, 3481, 3721, 4913, 6859, 9409, 11881, 12167, 12769, 16807, 17161, 22201, 24389, 27889, 32041, 32761, 37249, 49729, 52441, 54289, 66049, 69169, 72361, 83521, 97969
Offset: 1

Views

Author

Robert Hutchins, Mar 15 2009

Keywords

Comments

Previous name was: Numbers m whose reciprocal generates a repeating decimal fraction with period phi(m) and m/2 < phi(m) < m-1.
All terms are proper powers of full reptend primes (A001913).
This sequence does not contain every proper power of every term in A001913, for example, A001913 has 487 as its 26th term, but since 10 is not a primitive root of 487^2, 487^2 is not a term of this sequence. - Robert Hutchins, Oct 14 2021
A shorter description appears to be "Composite numbers with primitive root 10". - Arkadiusz Wesolowski, Jul 04 2012 (The two definitions certainly produce the same terms up through 83521. - N. J. A. Sloane, Jul 05 2012)

Crossrefs

Subsequence of A244623.
Subsequence of A167797.
Cf. A108989 (for base 2), A346316 (for base 6).

Programs

  • Maple
    select(n -> not isprime(n) and numtheory:-primroot(9,n) = 10,[$2..10000]);
    # N. J. A. Sloane, Jul 05 2012
  • Mathematica
    Select[Range[10^5], GCD[10, #] == 1 && #/2 < MultiplicativeOrder[10, #] < # - 1 &] (* Ray Chandler, Oct 17 2012 *)

Extensions

More terms from Robert Hutchins, Mar 21 2009
Entry revised by N. J. A. Sloane, Jul 05 2012
New name (using comment by Arkadiusz Wesolowski) from Joerg Arndt, Nov 22 2021

A216415 a(n) = smallest positive m such that 2n-1 | 10^m-1, or 0 if no such m exists.

Original entry on oeis.org

1, 1, 0, 6, 1, 2, 6, 0, 16, 18, 6, 22, 0, 3, 28, 15, 2, 0, 3, 6, 5, 21, 0, 46, 42, 16, 13, 0, 18, 58, 60, 6, 0, 33, 22, 35, 8, 0, 6, 13, 9, 41, 0, 28, 44, 6, 15, 0, 96, 2, 4, 34, 0, 53, 108, 3, 112, 0, 6, 48, 22, 5, 0, 42, 21, 130, 18, 0, 8, 46, 46, 6, 0, 42, 148, 75, 16, 0, 78, 13, 66, 81, 0, 166, 78, 18, 43, 0, 58, 178, 180, 60, 0, 16, 6, 95, 192, 0, 98, 99
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Comments

This is yet another version of the sequences defined in A002329, A007732, A070682, A084680. - N. J. A. Sloane, Sep 08 2012
a(n) gives the multiplicative order of 10 mod (2n-1), if it is finite, or 0 if not defined.

Crossrefs

Programs

  • PARI
    for(i=0,200,i++;if(i%5==0,print1(0","),print1(znorder(Mod(10,i))","))) \\ V. Raman, Nov 22 2012
    
  • PARI
    for(i=0,200,i++;m=0;for(x=1,i,if(((10^x-1))%i==0,m=x;break));print1(m",")) \\ V. Raman, Nov 22 2012

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

A334487 a(n) = p(n, 2)*p(n, 5)/p(n, 10) where p(n, b) is the period of repeating digits of 1/n in base b.

Original entry on oeis.org

1, 1, 4, 1, 4, 4, 3, 2, 36, 4, 25, 4, 8, 3, 8, 4, 8, 36, 9, 4, 6, 25, 11, 4, 20, 8, 108, 3, 14, 8, 1, 8, 50, 8, 12, 36, 432, 9, 8, 8, 80, 6, 28, 25, 72, 11, 23, 8, 21, 20, 8, 8, 208, 108, 50, 3, 18, 14, 29, 8, 30, 1, 6, 16, 8, 50, 44, 8, 22, 12, 5, 36, 81, 432, 40
Offset: 1

Views

Author

Michel Marcus, May 03 2020

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_, p_] := MultiplicativeOrder[p, n/(p^IntegerExponent[n, p])]; a[n_] := f[n, 2] * f[n, 5] / MultiplicativeOrder[10, n / 2^IntegerExponent[n, 2] / 5^IntegerExponent[n, 5]]; Array[a, 100] (* Amiram Eldar, May 04 2020 *)
  • PARI
    a2(n) = znorder(Mod(2,n/2^valuation(n,2))); \\ A007733
    a5(n) = znorder(Mod(5,n/5^valuation(n,5))); \\ A007736
    a10(n) = znorder(Mod(10,n/2^valuation(n,2)/5^valuation(n,5))); \\ A007732
    a(n) = a2(n)*a5(n)/a10(n);

Formula

a(n) = A007733(n)*A007736(n)/A007732(n).

A334488 Numbers m for which p(m, 2)*p(m, 5) = p(m, 10), where p(m, b) is the period of repeating digits of 1/m in base b.

Original entry on oeis.org

1, 2, 4, 31, 62, 124, 601, 1202, 2404, 2593, 4808, 5186, 9616, 10372, 18631, 20744, 37262, 41488, 74524, 82976, 149048, 165952, 298096, 331904, 599479, 1198958, 2397916, 204700049, 409400098, 466344409, 668731841, 818800196, 932688818, 1023500245, 1337463682, 1554449047
Offset: 1

Views

Author

Michel Marcus, May 03 2020

Keywords

Comments

Numbers m such that A334487(m) = 1.

Crossrefs

Programs

  • PARI
    a2(n) = znorder(Mod(2,n/2^valuation(n,2))); \\ A007733
    a5(n) = znorder(Mod(5,n/5^valuation(n,5))); \\ A007736
    a10(n) = znorder(Mod(10,n/2^valuation(n,2)/5^valuation(n,5))); \\ A007732
    isok(m) = a2(m)*a5(m) == a10(m);

Extensions

a(28) from Jinyuan Wang, May 03 2020
a(29)-a(36) from Giovanni Resta, May 04 2020
Previous Showing 21-30 of 47 results. Next