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

A275081 Duplicate of A097443.

Original entry on oeis.org

3, 13, 31, 43, 67, 71, 83, 89, 107, 151, 157, 163, 191, 197, 199, 227, 283, 293, 307, 311, 347, 359, 373, 401, 409, 431, 439, 443, 467, 479, 523, 557, 563, 569, 587, 599, 601, 631, 653, 677, 683, 719, 761, 787, 827, 839, 877, 881, 883, 911, 919, 929, 947
Offset: 1

Views

Author

Keywords

A347225 Lesser of twin primes (A001359) being both half-period primes (A097443).

Original entry on oeis.org

197, 599, 881, 1277, 1997, 2081, 2237, 2801, 2999, 3359, 4721, 5279, 5879, 6197, 6959, 7877, 8837, 9239, 9719, 12161, 12239, 13721, 17921, 17957, 18521, 21839, 22637, 24917, 28277, 30557, 31319, 31721, 32117, 32441, 32717, 34757, 35081, 35279, 35837, 38921, 39239, 39839
Offset: 1

Views

Author

Lamine Ngom, Aug 24 2021

Keywords

Comments

A proper subset of both A001359 and A097443.
Number of terms < 10^k: 0, 0, 3, 19, 86, 516, 3686, 27834, 216758, 1739358, …
A243096 provides lesser of twin primes being both full reptend primes (A001913, A006883): in other words, lesser of twin primes whose periods difference is 2.
This sequence lists lesser of twin primes whose periods difference is 1. Equivalently, these twin primes are both half-period primes (A097443).
The twin primes conjecture being true should imply that these two sequences are infinite.
Surprisingly, apart from 1 and 2, for any other value of k integer, it appears that the sequence "lesser of twin primes whose periods difference is k" is empty or contains at most two terms (no counterexample found for twin primes below 10^9).

Examples

			The decimal expansion 1/p for the prime p = 1277 has a periodic part length equal to (p-1)/2. 1277 is thus a half-period prime. The same applies for p + 2 = 1279 (prime). Hence 1277 is in sequence.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and isprime(t + 2) and numtheory:-order(10, t) = (t - 1)/2 and numtheory:-order(10, t + 2) = (t + 1)/2, [seq(t, t = 3 .. 40000, 2)]);

Formula

a(n) is congruent to {11, 17, 29} mod 30.

A347226 Safe primes (A005385) that are half-period primes (A097443).

Original entry on oeis.org

83, 107, 227, 347, 359, 467, 479, 563, 587, 719, 839, 1187, 1283, 1307, 1319, 1439, 1523, 1907, 2027, 2039, 2879, 2963, 2999, 3119, 3203, 3467, 3803, 3947, 4079, 4283, 4547, 4679, 4787, 4799, 4919, 5387, 5399, 5483, 5507, 5639, 5879, 6599, 6719, 6827, 7079, 7187, 7523
Offset: 1

Views

Author

Lamine Ngom, Aug 24 2021

Keywords

Comments

Apart from 5 and 11, a safe prime p is necessarily either a full reptend prime (A001913) or a half-period prime (A097443) since (p-1) is semiprime: 2*A005384(n) (Sophie Germain primes).
Safe primes being full reptend primes are listed in A000353.
a(n) is of the form 100*k + 10*{0, 2, 4, 6, 8} + {3, 7} or 100*k + 10*{1, 3, 5, 7, 9} + 9.
Number of terms < 10^k: 0, 1, 11, 56, 343, 2138, 15267, 114847, 886907, 7079602, ...

Examples

			(107-1)/2 = 53 is a prime, and the periodic part of the decimal expansion of 1/107 is of length 53.
Hence the safe prime 107 is in the sequence.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and isprime((t - 1)/2) and numtheory:-order(10, t) = (t - 1)/2, [seq(t, t = 3 .. 10000, 2)]);
  • Mathematica
    Select[Prime@Range@1000,PrimeQ[(#-1)/2]&&Length[First@@RealDigits[1/#]]==(#-1)/2&] (* Giorgos Kalogeropoulos, Sep 14 2021 *)

Formula

A005385 INTERSECTION A097443.
a(n) == {17, 23, 29} mod 30.
a(n) == 11 (mod 12). - Hugo Pfoertner, Aug 24 2021

A002371 Period of decimal expansion of 1/(n-th prime) (0 by convention for the primes 2 and 5).

Original entry on oeis.org

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

Keywords

Comments

a(n) is the minimum solution x of modular equation 10^x == 1 (mod p), where p = prime(n). - Carmine Suriano, Oct 10 2012
a(n) = smallest m such that 111...11 (m 1's) is divisible by the n-th prime, or 0 if no such m exists (with the exception that a(2) = 3 instead of 1). E.g., the 5th prime, 11, divides 11, so a(5) = 2. - N. J. A. Sloane, Oct 03 2013 [Comment corrected by Derek Orr, Jun 14 2014]
Numbers n such that A071126(n) = A000040(n) - 1. - Hugo Pfoertner, Mar 18 2003
Except for n = 1 and 3, a(n) divides A006093(n). - Robert Israel, Jul 15 2016

Examples

			A002371(11) = 15 because the 11th prime is 31, and 1/31 = 0.03225806451612903225806451612903225806452... has period 15. - _Richard F. Lyon_, Mar 29 2022
		

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, 2nd ed. New York: Dover, 1966, pages 65, 309. ISBN 0-486-21096-0.
  • John H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, 1996, p. 162. ISBN 978-0-387-97993-9.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 15.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A048595 for another version. Cf. A006883, A007732, A051626, A071126, A000040, A002275, A097443.
Cf. A001913 (full repetend primes), A060257 (1/prime(n) has period prime(n) - 1).

Programs

  • Maple
    seq(subs(FAIL=0,numtheory:-order(10, ithprime(n))),n=1..100); # Robert Israel, Jul 15 2016
  • Mathematica
    Table[ Length[ RealDigits[1 / Prime[n]] [[1, 1]]], {n, 1, 70}]
    Table[If[IntegerQ[#], #, 0] &[MultiplicativeOrder[10, Prime[n]]], {n, 1, 70}] (* Jan Mangaldan, Jul 07 2020 *)
  • PARI
    a(n)=if(n<4,n==2,znorder(Mod(10, prime(n))))
    
  • Python
    from sympy import prime, n_order
    def A002371(n): return 0 if n == 1 or n == 3 else n_order(10,prime(n)) # Chai Wah Wu, Feb 07 2022

Formula

From Alexander Adamchuk, Jan 28 2007: (Start)
a(A000720(p)) = p - 1 for primes p in A001913.
a(A060257(n)) = prime(A060257(n)) - 1. (End)

Extensions

More terms from Arlin Anderson (starship1(AT)gmail.com)
Edited by Charles R Greathouse IV, Mar 24 2010

A056157 Primes p whose period of reciprocal equals (p-1)/4.

Original entry on oeis.org

53, 173, 277, 317, 397, 769, 773, 797, 809, 853, 1009, 1013, 1093, 1493, 1613, 1637, 1693, 1721, 2129, 2213, 2333, 2477, 2521, 2557, 2729, 2797, 2837, 3329, 3373, 3517, 3637, 3733, 3797, 3853, 3877, 4133, 4241, 4253, 4373, 4493, 4729, 4733, 4877, 5081
Offset: 1

Views

Author

Don Willard (dwillard(AT)prairie.cc.il.us), Jun 05 2000

Keywords

Comments

Cyclic numbers of the fourth degree (or fourth order): the reciprocals of these numbers belong to one of four different cycles. Each cycle has the (number minus 1)/4 digits.

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 700]], f[ # ] == 4 &] (* Robert G. Wilson v, Aug 02 2000 *)
    LP[ n_Integer ] := (ds = Divisors[ n - 1 ]; Take[ ds, Position[ PowerMod[ 10, ds, n ], 1 ][ [ 1, 1 ] ] ][ [ -1 ] ]); CL[ n_Integer ] := (n - 1)/LP[ n ]; Select[ Range[ 7, 7500 ], PrimeQ[ # ] && CL[ # ] == 4 & ] (* Robert G. Wilson v, Aug 02 2000 *)

Extensions

More terms from Robert G. Wilson v, Aug 02 2000

A055628 Primes p whose period of the reciprocal 1/p is (p-1)/3.

Original entry on oeis.org

103, 127, 139, 331, 349, 421, 457, 463, 607, 661, 673, 691, 739, 829, 967, 1657, 1669, 1699, 1753, 1993, 2011, 2131, 2287, 2647, 2659, 2749, 2953, 3217, 3229, 3583, 3691, 3697, 3739, 3793, 3823, 3931, 4273, 4297, 4513, 4549, 4657, 4903, 4909, 4993, 5011
Offset: 1

Views

Author

Don Willard (dwillard(AT)prairie.cc.il.us), Jun 05 2000

Keywords

Comments

Cyclic numbers of the third degree (or third order): the reciprocals of these numbers belong to one of three different cycles. Each cycle has (number-1)/3 digits.
All primes p except 2 or 5 have a reciprocal with period which divides p-1.

Examples

			127 has period 42 and (127-1)/3 = 126/3 = 42.
		

References

  • Stephen P. Richards, A Number For Your Thoughts, 1982, 1984, Box 501, New Providence, NJ, 07974, ISBN 0-9608224-0-2.

Crossrefs

Programs

  • Mathematica
    LP[ n_Integer ] := (ds = Divisors[ n - 1 ]; Take[ ds, Position[ PowerMod[ 10, ds, n ], 1 ][ [ 1, 1 ] ] ][ [ -1 ] ]); CL[ n_Integer ] := (n - 1)/LP[ n ]; Select[ Range[ 7, 7500 ], PrimeQ[ # ] && CL[ # ] == 3 & ]
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 700]], f[ # ] == 3 &] (* Robert G. Wilson v, Sep 14 2004 *)

Extensions

More terms from Robert G. Wilson v, Aug 02 2000
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 27 2007

A056210 Primes p whose period of reciprocal equals (p-1)/5.

Original entry on oeis.org

11, 251, 1061, 1451, 1901, 1931, 2381, 3181, 3491, 3851, 4621, 4861, 5261, 6101, 6491, 6581, 6781, 7331, 8101, 9941, 10331, 10771, 11251, 11261, 11411, 12301, 14051, 14221, 14411, 15091, 15131, 16061, 16141, 16301, 16651, 16811, 16901
Offset: 1

Views

Author

Robert G. Wilson v, Aug 02 2000

Keywords

Comments

Cyclic numbers of the fifth degree (or fifth order): the reciprocals of these numbers belong to one of five different cycles. Each cycle has the (number minus 1)/5 digits.
From Robert Israel, Apr 02 2018: (Start)
Primes p such that A002371(A000720(p)) = (p-1)/5.
All terms == 1 (mod 10). (End)

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and numtheory:-order(10, t) = (t-1)/5, [seq(t,t=11..17000,10)]); # Robert Israel, Apr 02 2018
  • Mathematica
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 2000]], f[ # ] == 5 &]

Extensions

Entry revised by N. J. A. Sloane, Apr 30 2007

A054471 Smallest prime p having n different cycles in decimal expansions of k/p, k=1..p-1.

Original entry on oeis.org

7, 3, 103, 53, 11, 79, 211, 41, 73, 281, 353, 37, 2393, 449, 3061, 1889, 137, 2467, 16189, 641, 3109, 4973, 11087, 1321, 101, 7151, 7669, 757, 38629, 1231, 49663, 12289, 859, 239, 27581, 9613, 18131, 13757, 33931, 9161, 118901, 6763, 18233
Offset: 1

Views

Author

Robert G. Wilson v, 1994; Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), May 22 2000

Keywords

Comments

First cyclic number of n-th degree (or n-th order): the reciprocals of these numbers belong to one of n different cycles. Each cycle has (a(n) - 1)/n digits.
From Robert G. Wilson v, Aug 21 2014: (Start)
recursive by indices:
1, 7, 211, 79337, 634776923741, ...
2, 3, 103, 2368589, 785245568161181, ...
4, 53, 135257, 2332901103899, ...
5, 11, 353, 3795457, 693814982285339, ...
6, 79, 26861, 23947548497, ...
8, 41, 118901, 1015118238709, ...
9, 73, 142789, 267291583927, ...
10, 281, 3097183, 66880786504811, ...
12, 37, 18131, 105385168331, ...
13, 2393, 11160953, 7140939250711817, ...
14, 4999, 2148340247, > 10^19,
... .
(End)

References

  • John H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, p. 162.
  • M. Gardner, Mathematical Circus, Cambridge University Press (1996).

Crossrefs

First time n appears in A006556.
Cf. A006883, A097443, A055628, A056157, A056210, A056211, A056212, A056213, A056214, A056215, A056216, A056217, A098680, which are sequences of primes p where the period of the reciprocal is (p-1)/n for n=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13.
Cf. A101208, A101209 (similar sequences for base 2 and base 3).

Programs

  • Mathematica
    a[n_Integer] := Block[{m = If[ OddQ@ n, 2n, n]}, p = m +1; While[ !PrimeQ@ p || p != 1 + n*MultiplicativeOrder[10, p], p = p += m]; p]; a[1] = 7; a[4] = 53; Array[f, 50] (* Robert G. Wilson v, Apr 19 2005; revised Aug 20 2014 and Feb 14 2025 *)

Extensions

More terms from David W. Wilson, May 22 2000

A056211 Primes p whose period of reciprocal equals (p-1)/6.

Original entry on oeis.org

79, 547, 643, 751, 907, 997, 1201, 1213, 1237, 1249, 1483, 1489, 1627, 1723, 1747, 1831, 1879, 1987, 2053, 2551, 2683, 3049, 3253, 3319, 3613, 3919, 4159, 4507, 4519, 4801, 4813, 4831, 4969, 5119, 5443, 5557, 5791, 6079, 6151, 6271, 6373, 6427, 6529
Offset: 1

Views

Author

Robert G. Wilson v, Aug 02 2000

Keywords

Comments

Cyclic numbers of the sixth degree (or sixth order): the reciprocals of these numbers belong to one of six different cycles. Each cycle has the (number minus 1)/6 digits.

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 850]], f[ # ] == 6 &]

Extensions

Edited by N. J. A. Sloane, Apr 30 2007

A056212 Primes p whose period of reciprocal equals (p-1)/7.

Original entry on oeis.org

211, 617, 1499, 2087, 2857, 6007, 6469, 7127, 7211, 7589, 9661, 10193, 13259, 13553, 14771, 18047, 18257, 19937, 20903, 21379, 23549, 26153, 27259, 27539, 32299, 33181, 33461, 34847, 35491, 35897, 41651, 42407, 42491, 43051, 43793
Offset: 1

Views

Author

Robert G. Wilson v, Aug 02 2000

Keywords

Comments

Cyclic numbers of the seventh degree (or seventh order): the reciprocals of these numbers belong to one of seven different cycles. Each cycle has the (number minus 1)/7 digits.

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 4700]], f[ # ] == 7 &]

Extensions

Edited by N. J. A. Sloane, Apr 30 2007
Showing 1-10 of 17 results. Next