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-26 of 26 results.

A098937 Number of cyclic numbers, primes with primitive root 10, (A001913) in the first 10^n primes (A000040).

Original entry on oeis.org

5, 38, 387, 3755, 37523, 374126, 3740610, 37393725, 373953691, 3739544360
Offset: 1

Views

Author

Robert G. Wilson v, Oct 19 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ds, Position[ PowerMod[10, ds, n], 1][[1, 1]]][[ -1]]]; c = 0; k = 4; Do[ While[k <= 10^n, a = f[ Prime[k]]; If[a == 1, c++ ]; k++ ]; Print[c], {n, 7}]

Formula

Lim_{n->oo} a(n)/10^n = Artin's constant (A005596).

Extensions

a(8)-a(10) from Amiram Eldar, Jul 04 2021

A158899 These are numbers n such that the reciprocal, 1/n, is a repeating fraction whose period is n/2 - 1.

Original entry on oeis.org

14, 34, 38, 46, 58, 94, 118, 122, 194, 218, 226, 262, 298, 334, 358, 362, 386, 446, 458, 466, 514, 526, 538, 626, 674, 734, 758, 766, 778, 838, 866, 922, 974, 982, 998, 1006, 1018, 1082, 1142, 1154, 1186, 1238, 1294, 1318, 1402, 1418, 1454, 1486, 1622, 1642
Offset: 1

Views

Author

Robert Hutchins, Mar 29 2009

Keywords

Comments

These numbers relate to the long period primes, those that for 1/m the period is m-1 (sequence A006883) in that by multiplying each term in the long period primes by 2, this sequence is generated.

Crossrefs

Programs

  • PARI
    forstep(n=2, 2e3, 2, if ((setminus(Set(factor(n)[,1]), Set([2,5])) != []) && (znorder(Mod(10, n/2^valuation(n, 2)/5^valuation(n, 5))) + 1 == n/2), print1(n, ", "));); \\ Michel Marcus, Feb 24 2013

Extensions

More terms and edited by Michel Marcus, Feb 24 2013

A335012 Number of different remainders when the first n terms of 1, 11, 111, 1111, ... are divided by n.

Original entry on oeis.org

1, 1, 3, 2, 1, 3, 6, 3, 9, 1, 2, 4, 6, 6, 3, 4, 16, 9, 18, 2, 6, 2, 22, 5, 2, 6, 27, 7, 28, 3, 15, 5, 6, 16, 6, 10, 3, 18, 6, 3, 5, 6, 21, 3, 9, 22, 46, 6, 42, 2, 48, 7, 13, 27, 2, 8, 18, 28, 58, 4, 60, 15, 18, 6, 6, 6, 33, 17, 66, 6, 35, 11, 8, 3, 4, 19, 6, 6, 13, 4, 81
Offset: 1

Views

Author

Sen-Peng Eu, May 19 2020

Keywords

Comments

a(n) = n if and only if n is a power of 3.
Conjecture: a(n) = n-1 if and only if n is a long period prime (A006883), that is, n is a prime and the decimal expansion of 1/n has period n-1.
If gcd(n,30) = 1 then a(n) = A084680(n). - Robert Israel, Jun 25 2020

Examples

			a(4) = 2 since when 1, 11, 111, 1111 are divided by 4 the remainders are 1, 3, 3, 3, two different numbers.
a(6) = 3 since when 1, 11, 111, 1111, 11111, 111111 are divided by 6 the remainders are 1, 5, 3, 1, 5, 3, three different numbers.
		

Crossrefs

Programs

  • Maple
    with(ListTools): a := proc (n) return add(10^i, i = 0 .. n-1) end proc: r := proc (n) return seq(`mod`(a(i), n), i = 1 .. n) end proc: seq(nops(MakeUnique([r(n)])), n = 1 .. 243);
    # Simpler:
    f:= n -> nops({seq(((10^i-1)/9) mod n,i=1..n)}):
    map(f, [$1..100]); # Robert Israel, Jun 25 2020
  • Mathematica
    Table[Length@ Union@ Array[Mod[(10^# - 1)/9, n] &, n], {n, 81}] (* Michael De Vlieger, Jun 28 2020 *)
  • PARI
    a(n) = #Set(vector(n, k, (10^k-1)/9) % n); \\ Michel Marcus, Jun 15 2020

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

A381590 Primes with primitive root -100.

Original entry on oeis.org

3, 7, 19, 23, 31, 43, 47, 59, 67, 71, 83, 107, 131, 151, 163, 167, 179, 191, 199, 223, 227, 263, 283, 307, 311, 347, 359, 367, 379, 383, 419, 431, 439, 443, 467, 479, 487, 491, 499, 503, 523, 563, 571, 587, 599, 619, 631, 647, 659, 683, 719, 727, 743, 787, 811
Offset: 1

Views

Author

Davide Rotondo, Feb 28 2025

Keywords

Comments

Union of long period primes (A006883) of the form 4k-1 and half period primes (A097443) of the form 4k-1.
Complement of A007349 in the union of A007348 and A001913. - Davide Rotondo, May 23 2025

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[150]], MultiplicativeOrder[-100, #] == # - 1 &]  (* Amiram Eldar, Mar 02 2025 *)
  • PARI
    is(n)=gcd(n,10)==1 && znorder(Mod(-100, n))==n-1 \\ Charles R Greathouse IV, Mar 01 2025
    
  • PARI
    list(lim)=my(v=List([3])); forprime(p=7,lim, if(znorder(Mod(-100, p))==p-1, listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Mar 01 2025
Previous Showing 21-26 of 26 results.