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

A385222 a(n) is the multiplicative order of -10 modulo prime(n); a(1) = a(3) = 0 for completion.

Original entry on oeis.org

0, 2, 0, 3, 1, 3, 16, 9, 11, 28, 30, 6, 10, 42, 23, 26, 29, 60, 66, 70, 8, 26, 82, 44, 96, 4, 17, 106, 108, 112, 21, 65, 8, 23, 148, 150, 39, 162, 83, 86, 89, 180, 190, 192, 49, 198, 15, 111, 226, 228, 232, 14, 15, 25, 256, 131, 268, 10, 138, 28
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A007348 (primes having primitive root -10).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, A380542, this sequence.

Programs

  • Mathematica
    A385222[n_] := If[n == 1 || n == 3, 0, MultiplicativeOrder[-10, Prime[n]]];
    Array[A385222, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-10}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A007450 Decimal expansion of 1/17.

Original entry on oeis.org

0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7, 0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7, 0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7, 0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7, 0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7, 0, 5, 8, 8, 2, 3, 5
Offset: 0

Views

Author

Keywords

Comments

Period 16: repeat [0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7]. - Joerg Arndt, Mar 25 2013

References

  • H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, 'Die periodischen Dezimalbrueche'. [From Reinhard Zumkeller, Oct 06 2008]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Magma
    I:=[0, 5, 8, 8, 2, 3, 5, 2, 9]; [n le 9 select I[n] else Self(n-1)-Self(n-8)+Self(n-9): n in [1..100]]; // Vincenzo Librandi, Mar 25 2013
    
  • Mathematica
    CoefficientList[Series[-x (7 x^7 - 3 x^6 + 2 x^5 + x^4 - 6 x^3 + 3 x + 5)/((x - 1) (x^8+1)), {x, 0, 100}], x] (* Vincenzo Librandi, Mar 25 2013 *)
  • PARI
    a(n)=[0,5,8,8,2,3,5,2,9,4,1,1,7,6,4,7][n%16+1]; /* Joerg Arndt, Mar 25 2013 */

Formula

From Reinhard Zumkeller, Oct 06 2008: (Start)
A028416(4)=17; A002371(A049084(17)) = A002371(7)=16;
a(n+16) = a(n), a(n+16/2) = 9 - a(n). (End)
G.f.: -x*(7*x^7-3*x^6+2*x^5+x^4-6*x^3+3*x+5)/((x-1)*(x^8+1)). - Colin Barker, Aug 15 2012

A007615 Primes with unique period length (the periods are given in A007498).

Original entry on oeis.org

3, 11, 37, 101, 333667, 9091, 9901, 909091, 1111111111111111111, 11111111111111111111111, 99990001, 999999000001, 909090909090909091, 900900900900990990990991, 9999999900000001, 909090909090909090909090909091, 900900900900900900900900900900990990990990990990990990990991
Offset: 1

Views

Author

Keywords

Comments

Additional terms are Phi(n,10)/gcd(n,Phi(n,10)) for the n in A007498, where Phi(n,10) is the n-th cyclotomic polynomial evaluated at 10.

Examples

			3 is the only prime p such that decimal expansion of 1/p has (nontrivial) period exactly 1.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Samuel Yates, Period Lengths of Exactly One or Two Prime Numbers, J. Rec. Math., 18 (1985), 22-24.

Crossrefs

Programs

  • Mathematica
    nmax = 50; periods = Reap[ Do[ p = Cyclotomic[n, 10] / GCD[n, Cyclotomic[n, 10]]; If[ PrimeQ[p], Sow[n]], {n, 1, nmax}]][[2, 1]]; Cyclotomic[#, 10] / GCD[#, Cyclotomic[#, 10]]& /@ periods // Prepend[#, 3]& (* Jean-François Alcover, Mar 28 2013 *)

Formula

a(n) = A061075(A007498(n)). - Max Alekseyev, Oct 16 2010
a(n) = A006530(A019328(A007498(n))). - Ray Chandler, May 10 2017

A071126 Length of least repunit which is a multiple of the n-th prime, or 0 if no such multiple exists.

Original entry on oeis.org

0, 3, 0, 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

Lekraj Beedassy, May 28 2002

Keywords

Comments

If prime(n) = p then a(n) is a divisor of p-1. - Amarnath Murthy, Nov 11 2002

Examples

			The 13th prime, 41, divides the repunit 11111, the smallest among all R(5k) which are multiples of 41.
		

Crossrefs

Number of 1's in A077573(n).
Cf. A000042. Apart from a(2), identical to A002371.

Programs

  • Mathematica
    Table[Function[p, If[Divisible[10, p], 0, k = {1}; While[! Divisible[ FromDigits@ k, p], AppendTo[k, 1]]; Length@ k]]@ Prime@ n, {n, 67}] (* Michael De Vlieger, May 20 2017 *)
  • Python
    from sympy import prime
    from itertools import count
    def a(n):
        if n == 1 or n == 3: return 0
        pn = prime(n)
        return next(k for k in count(1) if 10**k//9%pn == 0)
    print([a(n) for n in range(1, 68)]) # Michael S. Branicky, Jul 24 2025

A051627 Periods associated with A040017.

Original entry on oeis.org

1, 2, 3, 4, 10, 12, 9, 14, 24, 36, 48, 38, 19, 23, 39, 62, 120, 150, 106, 93, 134, 294, 196, 320, 654, 738, 385, 586, 317, 597, 1404, 945, 1452, 1836, 1752, 1172, 1812, 1282, 1426, 2232, 1862, 1844, 1521, 2134, 3750, 1031, 2264, 2667, 4354, 3927, 4274, 6522, 3903, 6022, 6682, 6135, 9550, 5877
Offset: 1

Views

Author

Keywords

Comments

The numbers in A007498 sorted according to the magnitude of the corresponding prime. - T. D. Noe, Sep 08 2005

Examples

			The decimal expansion of 1/101 is 0.00990099..., having a period of 4 and it is the only prime with that period.
		

Programs

  • Mathematica
    nmax = 10000; primesPeriods = Reap[Do[p = Cyclotomic[n, 10]/GCD[n, Cyclotomic[n, 10]]; If[PrimeQ[p], Print[n]; Sow[{p, n}]], {n, 1, nmax}]][[2, 1]]; Sort[primesPeriods][[All, 2]] // Prepend[#, 1]& // Take[#, 58]& (* Jean-François Alcover, Mar 29 2013 *)

Formula

a(n) = A002371(A000720(A040017(n))). - Max Alekseyev, Oct 14 2022

Extensions

More terms from Jud McCranie
More terms from T. D. Noe, Sep 08 2005
Corrected a(45)=3750 and extended by Ray Chandler, Oct 13 2008

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

A087000 Half length of periodic part of decimal expansion of 1/p for those primes having a periodic part of even length.

Original entry on oeis.org

3, 1, 3, 8, 9, 11, 14, 23, 29, 30, 4, 22, 48, 2, 17, 54, 56, 21, 65, 4, 23, 74, 39, 83, 89, 90, 96, 49, 15, 111, 114, 116, 15, 25, 128, 131, 134, 14, 73, 156, 55, 168, 58, 16, 183, 93, 189, 191, 194, 100, 102, 209, 70, 216, 16, 76, 230, 77, 243, 245, 249, 251
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 29 2003

Keywords

Comments

a(n) appears to be the least k such that 10^k+1 is divisible by A028416(n). See A001271. - Michel Marcus, Aug 13 2023

Crossrefs

Formula

a(n) = A002371(A049084(A028416(n)))/2.
a(n) = A055642(A086999(n))/2.
a(n) = A055642(A087001(n)) = A055642(A087002(n)).

A372801 Order of 16 modulo the n-th prime: least k such that prime(n) divides 16^k-1.

Original entry on oeis.org

1, 1, 3, 5, 3, 2, 9, 11, 7, 5, 9, 5, 7, 23, 13, 29, 15, 33, 35, 9, 39, 41, 11, 12, 25, 51, 53, 9, 7, 7, 65, 17, 69, 37, 15, 13, 81, 83, 43, 89, 45, 95, 24, 49, 99, 105, 37, 113, 19, 29, 119, 6, 25, 4, 131, 67, 135, 23, 35, 47, 73, 51, 155, 39, 79, 15, 21, 173, 87, 22, 179
Offset: 2

Views

Author

Jianing Song, May 13 2024

Keywords

Comments

a(n) is the period of the expansion of 1/prime(n) in hexadecimal.

Crossrefs

Cf. A302141 (order of 16 mod 2n+1).

Programs

  • PARI
    a(n) = znorder(Mod(16, prime(n))).

Formula

a(n) = A014664(n)/gcd(4, A014664(n)) = A082654(n)/gcd(2, A082654(n)).
a(n) <= (prime(n) - 1)/2.

A060259 Denoting 4 consecutive primes by p, q, r and s, these are the values of q such that q and r have 10 as a primitive root, but p and s do not.

Original entry on oeis.org

59, 109, 179, 229, 571, 701, 937, 1019, 1171, 1429, 1619, 1777, 1811, 1847, 2063, 2269, 2297, 2339, 2383, 2447, 2731, 2819, 2927, 3257, 3299, 3331, 3461, 3571, 3593, 3617, 3701, 3833, 3967, 4139, 4259, 4421, 4567, 4691, 4937, 5087, 5153, 5179, 5417
Offset: 1

Views

Author

Jeff Burch, Mar 23 2001

Keywords

Comments

A prime p has 10 as a primitive root iff the length of the period of the decimal expansion of 1/p is p-1.

Crossrefs

Programs

  • Mathematica
    test[p_] := MultiplicativeOrder[10, p]===p-1; Prime/@Select[Range[2, 800], test[Prime[ # ]]&&test[Prime[ #+1]]&&!test[Prime[ #-1]]&&!test[Prime[ #+2]]&]
    Prime[#+1]&/@SequencePosition[Table[If[MultiplicativeOrder[10,p]===p-1,1,0],{p,Prime[Range[ 800]]}],{0,1,1,0}][[;;,1]] (* Harvey P. Dale, Nov 29 2023 *)

Extensions

Edited by Dean Hickerson, Jun 17 2002
Offset corrected by Amiram Eldar, Oct 03 2021

A060260 Numbers k such that prime(k), prime(k+1) and prime(k+2) have 10 as a primitive root, but prime(k-1) and prime(k+3) do not.

Original entry on oeis.org

55, 75, 141, 164, 184, 199, 358, 371, 380, 432, 559, 702, 745, 808, 825, 858, 882, 1077, 1097, 1279, 1299, 1303, 1328, 1408, 1431, 1486, 1502, 1558, 1654, 1702, 1724, 1744, 1768, 1820, 1835, 1873, 1901, 1905, 1953, 1977, 2050, 2148, 2216, 2220, 2267
Offset: 1

Views

Author

Jeff Burch, Mar 23 2001

Keywords

Comments

A prime p has 10 as a primitive root iff the length of the period of the decimal expansion of 1/p is p-1.

Crossrefs

The corresponding primes are in A060261.

Programs

  • Mathematica
    test[p_] := MultiplicativeOrder[10, p]===p-1; Select[Range[2, 2500], test[Prime[ # ]]&&test[Prime[ #+1]]&&test[Prime[ #+2]]&&!test[Prime[ #-1]]&&!test[Prime[ #+3]]&]

Extensions

Edited by Dean Hickerson, Jun 17 2002
Previous Showing 31-40 of 64 results. Next