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

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

Original entry on oeis.org

257, 379, 811, 971, 1097, 1217, 2411, 2539, 2617, 3011, 4051, 5297, 5657, 6211, 6337, 6659, 6857, 8647, 8807, 10457, 10651, 10687, 10937, 11731, 11939, 12451, 12577, 13099, 14011, 14537, 14731, 14887, 15137, 15607, 15737, 16091, 16411
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 indices of these primes are in A060260.

Programs

  • Mathematica
    test[p_] := MultiplicativeOrder[10, p]===p-1; Prime/@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
Offset corrected by Amiram Eldar, Oct 03 2021

A060262 a(n) is the smallest k such that prime(k), prime(k+1), ..., prime(k+n-1) all have 10 as a primitive root, but prime(k-1) and prime(k+n) do not.

Original entry on oeis.org

4, 17, 55, 7, 93, 754, 2611, 31092, 55207, 301252, 955428, 805428, 3651249, 3686621, 5510710, 42337888, 109670084, 590903433, 1010572448
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.
a(21) = 9774718453 and a(23) = 9525468065. - Amiram Eldar, Oct 03 2021

Crossrefs

Programs

  • Mathematica
    test[p_] := MultiplicativeOrder[10, p]===p-1; For[n=1, n<100, n++, a[n]=0]; v=4; While[True, For[n=1, test[Prime[v+n]], n++, Null]; If[a[n]==0, a[n]=v; Print["a(", n, ") = ", v]]; For[v+=n+1, !test[Prime[v]], v++, Null]]

Extensions

Edited by Dean Hickerson, Jun 17 2002
a(13)-a(19) from Amiram Eldar, Oct 03 2021

A060282 Periodic part of decimal expansion of reciprocal of n-th prime (leading 0's omitted).

Original entry on oeis.org

0, 3, 0, 142857, 9, 76923, 588235294117647, 52631578947368421, 434782608695652173913, 344827586206896551724137931, 32258064516129, 27, 2439, 23255813953488372093, 212765957446808510638297872340425531914893617
Offset: 1

Views

Author

N. J. A. Sloane, Mar 30 2001

Keywords

Examples

			1/7 = 0.142857142..., so a(4) = 142857.
1/11 = 0.09090909..., so a(5) = 9.
		

Crossrefs

Programs

  • Mathematica
    primePer[1] = primePer[3] = 0; primePer[n_] := FromDigits[(d = RealDigits[1/Prime[n]])[[1, 1]]] * 10^d[[2]]; Array[ primePer, 15] (* Amiram Eldar, Apr 28 2020 *)
  • PARI
    f(n)=if(n<4,n==2,znorder(Mod(10, prime(n)))) \\ A002371
    for(n=1,100,print1(floor(10^f(n)/prime(n)),","))

Formula

a(n) = floor(10^A002371(n)/prime(n)).
a(n) = 0 if and only if n = 1 or 3, corresponding to the primes 2 and 5, which are factors of 10. - Alonso del Arte, Apr 03 2020
ceiling(log_10(a(n))) = prime(n) - 1 if prime(n) is a full reptend prime (A001913). - Alonso del Arte, Apr 14 2020

Extensions

More terms from Klaus Brockhaus, Mar 30 2001

A238104 Sum of digits in periodic part of decimal expansion of 1/prime(n).

Original entry on oeis.org

0, 3, 0, 27, 9, 27, 72, 81, 99, 126, 54, 9, 18, 90, 207, 63, 261, 270, 144, 126, 36, 54, 171, 198, 432, 18, 153, 225, 486, 504, 189, 585, 36, 207, 666, 306, 351, 360, 747, 207, 801, 810, 369, 864, 441, 405, 135, 999, 486, 1026, 1044, 18, 135, 225, 1152, 1179, 1206, 18, 324, 126, 621, 657, 675, 612, 1404, 351
Offset: 1

Views

Author

Kozhukhov Vlad, Dec 04 2013

Keywords

Comments

Digit-sum of A060283(n).

Examples

			Prime(6) = 13, 1/13 = 0.076923076923076923076923..., the periodic part of which is 076923, whose digits add to 27 = a(6).
Since prime(n) must either divide or be coprime to 10, decimal expansions of prime(n) must either terminate or be purely recurrent, respectively. The only primes that divide 10 are prime(1) and prime(3), thus a(1) and a(3) = 0 as they have terminating decimal expansions. - _Michael De Vlieger_, May 20 2017
		

Crossrefs

Programs

  • Mathematica
    Table[Function[p, If[Divisible[10, p], 0, Total[RealDigits[1/p][[1, 1]]]]]@ Prime@ n, {n, 66}] (* Michael De Vlieger, May 20 2017 *)
  • PARI
    forprime(i=1,1e2,print1(sumdigits((10^iferr(znorder(Mod(10,i)),E,0)-1)/i)", ")) \\ Lear Young, Mar 01 2014

Formula

a(n) = A007953(A060283(n)). - Michel Marcus, Mar 02 2014

Extensions

Edited by David Applegate, Mar 01 2014

A186635 Primes p such that the decimal expansion of 1/p has a periodic part of odd length.

Original entry on oeis.org

2, 3, 5, 31, 37, 41, 43, 53, 67, 71, 79, 83, 107, 151, 163, 173, 191, 199, 227, 239, 271, 277, 283, 307, 311, 317, 347, 359, 397, 431, 439, 443, 467, 479, 523, 547, 563, 587, 599, 613, 631, 643, 683, 719, 733, 751, 757, 773, 787, 797, 827, 839, 853, 883, 907, 911, 919, 947, 991, 1013, 1031, 1039, 1093, 1123, 1151, 1163, 1187
Offset: 1

Views

Author

Jani Melik, Feb 24 2011

Keywords

Comments

Interestingly, the initial terms of A040119 (Primes p such that x^4 = 10 has a solution mod p) are identical to the initial terms of this sequence except for 241 which is a term of A040119 but not of A186635. [John W. Layman, Feb 25 2011]
There are many numbers in A040119 that are not here: 241, 641, 769, 809, 1009, 1409, 1601, 1721.... - T. D. Noe, Feb 25 2011

Crossrefs

Cf. A002371, A048595, A028416 (complement in the primes), A040119.

Programs

  • Maple
    Ax := proc(n) local st:
    st := ithprime(n):
    if (modp(numtheory[order](10,st),2) <> 0) then
       RETURN(st)
    fi: end:  seq(Ax(n), n=1..200);
  • Mathematica
    Union[{2, 5}, Select[Prime[Range[200]], OddQ[Length[RealDigits[1/#][[1, 1]]]] &]]
  • PARI
    select( {is_A186635(n)=isprime(n) && (n<7 || znorder(Mod(10, n))%2)}, [0..1234]) \\ M. F. Hasler, Nov 19 2024
    
  • Python
    from sympy import isprime, n_order
    is_A186635 = lambda n: isprime(n) and (n<7 or n_order(10, n)%2)
    [n for n in range(1234) if is_A186635(n)] # M. F. Hasler, Nov 19 2024

A246489 Duodecimal period of 1/(n-th prime) (0 by convention for the primes 2 and 3).

Original entry on oeis.org

0, 0, 4, 6, 1, 2, 16, 6, 11, 4, 30, 9, 40, 42, 23, 52, 29, 15, 66, 35, 36, 26, 41, 8, 16, 100, 102, 53, 54, 112, 126, 65, 136, 138, 148, 150, 3, 162, 83, 172, 89, 90, 95, 24, 196, 66, 14, 222, 113, 114, 8, 119, 120, 125, 256, 131, 268, 54, 138, 280
Offset: 1

Views

Author

Eric Chen, Nov 15 2014

Keywords

Comments

For p >= 5 (n >= 3): multiplicative order of 12 mod prime(n). - Joerg Arndt, Nov 15 2014

Examples

			For n=9, prime(9) = 23, 1/23 in base 12 is 0. 06316948421 06316948421 ..., which has period 11, so a(9) = 11.
		

Crossrefs

Cf. A002371 (decimal versions).

Programs

  • Maple
    with(numtheory):
    a:= n-> `if`(n<3, 0, order(12, ithprime(n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 16 2014
  • PARI
    /* nonzero terms only: */
    forprime(p=5,10^3,print1(znorder(Mod(12,p)),", ")); \\ Joerg Arndt, Nov 15 2014

Formula

a(n) = A246004(prime(n)).

A284601 Numbers k such that the decimal representation of 1/k does not terminate and has odd period.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 24, 27, 30, 31, 36, 37, 41, 43, 45, 48, 53, 54, 60, 62, 67, 71, 72, 74, 75, 79, 81, 82, 83, 86, 90, 93, 96, 106, 107, 108, 111, 120, 123, 124, 129, 134, 135, 142, 144, 148, 150, 151, 155, 158, 159, 162, 163, 164, 166, 172, 173, 180, 185, 186, 191, 192, 199, 201, 205, 212, 213, 214, 215
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 30 2017

Keywords

Comments

From Robert G. Wilson v, Apr 02 2017: (Start)
If k is in the sequence, then so are 2k and 5k.
The complement of A284602.
Primitives: 3, 9, 27, 31, 37, 41, 43, 53, 67, 71, 79, 81, 83, 93, 107, 111, 123, ..., .
(End)
From Robert Israel, Apr 03 2017: (Start)
Numbers of the form 2^j * 5^k * m where m > 1, gcd(m,10)=1 and the multiplicative order of 10 (mod m) is odd.
Complement of A003592 in the multiplicative semigroup generated by A186635, i.e., numbers whose prime factors are in A186635 with at least one prime factor not 2 or 5. (End)

Examples

			27 is in the sequence because 1/27 = 0.0370(370)... period is 3, 3 is odd.
2 and 5 are not in the sequence because 1/2 = 0.5 and 1/5 = 0.2 are terminating expansions. See also comments in A051626 and A284602.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local m;
      m:= n/2^padic:-ordp(n,2);
      m:= m/5^padic:-ordp(m,5);
      m > 1 and numtheory:-order(10,m)::odd
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Apr 03 2017
  • Mathematica
    Select[Range[215], Mod[Length[RealDigits[1/#][[1, -1]]], 2] == 1 & ]

A072858 Primes p such that the period of the decimal expansion of 1/p is a square.

Original entry on oeis.org

2, 3, 5, 17, 101, 163, 257, 577, 883, 1297, 1801, 3137, 3529, 5477, 7057, 7351, 8929, 9397, 11831, 12101, 13457, 13553, 14401, 15361, 15377, 15973, 19841, 20809, 21401, 21601, 23549, 24337, 25601, 29401, 30977, 33301, 33751, 33857, 38237
Offset: 1

Views

Author

Benoit Cloitre, Jul 26 2002

Keywords

Examples

			The period of 1/17 = 0.05882352941176470588... is 16 = 4^2, hence 17 is in the sequence.
The period of 1/163 = 81 = 9^2.
		

Crossrefs

Cf. A002371.

Programs

  • Mathematica
    Select[Prime[Range[4000]], IntegerQ @ Sqrt[Length[RealDigits[1/#][[1, 1]]]] &] (* Amiram Eldar, May 21 2022 *)
  • PARI
    (a(n)=if(n<4,n==2,znorder(Mod(10, prime(n))))); for(n=1,1000,if(issquare(a(n))==1,print1(prime(n),","))) /* Thanks to Michael Somos for improvement of the PARI program */

A129727 Primes p for which the period length of 1/p is a semiprime.

Original entry on oeis.org

7, 13, 23, 31, 43, 47, 59, 67, 71, 101, 103, 139, 167, 179, 191, 263, 277, 283, 293, 311, 383, 431, 439, 443, 503, 547, 557, 599, 607, 613, 653, 683, 787, 809, 827, 853, 859, 863, 887, 947, 983, 997, 1013, 1019, 1039, 1163, 1213, 1237, 1321, 1367, 1399, 1423
Offset: 1

Views

Author

Jonathan Vos Post, May 12 2007

Keywords

Comments

The prime index of A122183. Semiprime analog of A072859 = primes p for which the period length of 1/p is prime. Based upon A002371 = period of decimal expansion of 1/(n-th prime).

Examples

			a(1) = 7 because A000040(4) Period of decimal expansion of 1/7 = 6 = 2*3, a semiprime.
a(2) = 13 because A000040(6) = 6 = 2*3.
a(3) = 23 because A000040(9) = 22 = 2*11.
a(4) = 31 because A000040(11) = 15 = 3*5.
a(5) = 43 because A000040(14) = 21 = 3*7.
a(6) = 47 because A000040(15) = 46 = 2*23.
a(7) = 59 because A000040(17) = 58 = 2*29.
		

Crossrefs

Programs

  • Mathematica
    fQ[p_] := Plus @@ Last /@ FactorInteger@Length@RealDigits[1/p][[1, 1]] == 2;; lst = {}; Do[ p = Prime@n; If[ fQ@p, AppendTo[lst, p]], {n, 230}] (* Robert G. Wilson v *)

A240665 Least k such that 10^k == -1 (mod prime(n)), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 3, 1, 3, 8, 9, 11, 14, 0, 0, 0, 0, 23, 0, 29, 30, 0, 0, 4, 0, 0, 22, 48, 2, 17, 0, 54, 56, 21, 65, 4, 23, 74, 0, 39, 0, 83, 0, 89, 90, 0, 96, 49, 0, 15, 111, 0, 114, 116, 0, 15, 25, 128, 131, 134, 0, 0, 14, 0, 73, 0, 0, 156, 0, 55, 168, 0, 58, 16, 0
Offset: 1

Views

Author

T. D. Noe, Apr 14 2014

Keywords

Comments

The least k, if it exists, such that prime(n) divides 10^k + 1.

Crossrefs

Cf. A002371 (order of 10 mod prime(n)), A068958.

Programs

  • Mathematica
    Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[10, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]

Formula

a(n) = A002371(n)/2 if A002371(n) is even, otherwise 0.
a(n) = A068958(n) for n > 3. - Georg Fischer, Oct 23 2018
Previous Showing 41-50 of 64 results. Next