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

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

A381578 For n > 0, for k > n, a(n) is the least k such that the pre-period and first period of the decimal expansion of n/k contains every digit of n at least as many times it is contained in n.

Original entry on oeis.org

6, 7, 8, 7, 7, 9, 8, 9, 10, 17, 17, 14, 17, 17, 17, 17, 19, 19, 21, 21, 23, 23, 29, 28, 27, 27, 28, 29, 32, 31, 34, 34, 38, 38, 38, 38, 38, 39, 46, 43, 42, 43, 46, 46, 46, 47, 49, 49, 51, 51, 53, 53, 57, 56, 57, 57, 58, 59, 61, 61, 62, 63, 65, 65, 68, 67, 68, 69
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 28 2025

Keywords

Comments

What is the density of a(n) = prime in this sequence ?

Examples

			n = 1:
  1/2 = 0.500...
  1/3 = 0.33...
  1/4 = 0.2500...
  1/5 = 0.200...
  1/6 = 0.166... contains the digit 1, thus a(1) = 6.
n = 2:
  2/3 = 0.66...
  2/4 = 0.500...
  2/5 = 0.400...
  2/6 = 0.33...
  2/7 = 0.285714285714...contains the digit 2, thus a(2) = 7.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n+1, r = Range[0, 9]}, While[! AllTrue[Count[Flatten[RealDigits[n/k][[1]]], #] & /@ r - DigitCount[n, 10, r], # >= 0 &], k++]; k]; Array[a, 100] (* Amiram Eldar, Feb 28 2025 *)

A386519 Index of the smallest prime p such that the number of digits L in the repeating decimal period of 1/p equals the n-th prime.

Original entry on oeis.org

5, 12, 13, 52, 2431, 16, 153888, 27417323062119920, 223378173194137397198, 452, 406, 150886, 23, 40, 2153717, 28, 92971458509, 130, 40998
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 24 2025

Keywords

Comments

In general, for (q,2*5)=1, the length of the period of 1/q is equal to the multiplicative order of 10 modulo q, which is the smallest k such that 10^k == 1 (mod q). It follows that a(n) must be a prime divisor of 10^prime(n)-1. Hence, apart from a(2), we have prime(a(n)) = A147555(n) and a(20) is the index of the prime 241573142393627673576957439049. - Giovanni Resta, Jul 24 2025

Examples

			a(1) = 5, since the 5th prime, p = 11, has a repeating decimal period of length L = 2, and 2 = prime(1). There is no smaller prime for which the period length equals the 1st prime.
 n      a(n)         p  L
 1         5        11  2
 2        12        37  3
 3        13        41  5
 4        52       239  7
 5      2431     21649 11
 6        16        53 13
 7    153888   2071723 17
		

Crossrefs

Extensions

a(8)-a(19) from Giovanni Resta, Jul 24 2025
Previous Showing 61-64 of 64 results.