

A101208


Smallest odd prime p such that n = (p  1) / ord_p(2).


4



3, 7, 43, 113, 251, 31, 1163, 73, 397, 151, 331, 1753, 4421, 631, 3061, 257, 1429, 127, 6043, 3121, 29611, 1321, 18539, 601, 15451, 14327, 2971, 2857, 72269, 3391, 683, 2593, 17029, 2687, 42701, 11161, 13099, 1103, 71293, 13121, 17467, 2143, 83077, 25609, 5581
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

First time n appears is given in A001917.
Smallest p (let it be the kth prime) such that A001917(k) = n, or the smallest prime which has ratio n in base 2.
First cyclic number (in base 2) of nth degree (or nth order): the reciprocals of these numbers belong to one of n different cycles. Each cycle has (a(n)  1)/n digits.
Conjecture: a(n) is defined for all n.
Recursive by indices: (See A054471)
1, 3, 43, 83077, ...
2, 7, 1163, ...
4, 113, 257189, ...
5, 251, 6846277, ...
6, 31, 683, ...
8, 73, 472019, ...
9, 397, 13619483, ...
10, 151, 349717, ...
...
The records for the ratio in base 2 are: 1, 2, 6, 8, 18, 24, 31, 38, 72, 105, 129, 630, 1285, 1542, 2048, ..., the primes are: 3, 7, 31, 73, 127, 601, 683, 1103, 1801, 2731, 5419, 8191, 43691, 61681, 65537, ...
(Updated by Eric Chen, Jun 01 2015)


LINKS

Eric Chen, Table of n, a(n) for n = 1..612
V. Papadimitriou, The 1/p ratio of the first hundred million primes


MATHEMATICA

f[n_Integer] := Block[{k = 1, p}, While[p = k*n + 1; ! PrimeQ[p]  p != 1 + n*MultiplicativeOrder[2, p]  p = 2, k++]; p]; Array[f, 128] (* Eric Chen, Jun 01 2015 *)


PROG

(PARI) a(n) = {p=3; ok = 0; until(ok, if (n == (p1)/znorder(Mod(2, p)), ok = 1, p = nextprime(p+1)); ); return (p); } \\ Michel Marcus, Jun 27 2013


CROSSREFS

Cf. A001917, A101209, A054471.
Cf. A001122, A115591, A001133, A001134, A001135, A001136, A152307, A152308, A152309, A152310, A152311, which are sequences of primes p where the period of the reciprocal in base 2 is (p1)/n for n=1 to 11.
Sequence in context: A213893 A236476 A282178 * A050633 A107636 A303160
Adjacent sequences: A101205 A101206 A101207 * A101209 A101210 A101211


KEYWORD

nonn,nice,base


AUTHOR

Leigh Ellison (le(AT)maths.gla.ac.uk), Dec 14 2004


STATUS

approved



