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.

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

This page as a plain text file.
%I A101208 #49 Jun 02 2015 03:34:28
%S A101208 3,7,43,113,251,31,1163,73,397,151,331,1753,4421,631,3061,257,1429,
%T A101208 127,6043,3121,29611,1321,18539,601,15451,14327,2971,2857,72269,3391,
%U A101208 683,2593,17029,2687,42701,11161,13099,1103,71293,13121,17467,2143,83077,25609,5581
%N A101208 Smallest odd prime p such that n = (p - 1) / ord_p(2).
%C A101208 First time n appears is given in A001917.
%C A101208 Smallest p (let it be the k-th prime) such that A001917(k) = n, or the smallest prime which has ratio n in base 2.
%C A101208 First cyclic number (in base 2) 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.
%C A101208 Conjecture: a(n) is defined for all n.
%C A101208 Recursive by indices: (See A054471)
%C A101208 1, 3, 43, 83077, ...
%C A101208 2, 7, 1163, ...
%C A101208 4, 113, 257189, ...
%C A101208 5, 251, 6846277, ...
%C A101208 6, 31, 683, ...
%C A101208 8, 73, 472019, ...
%C A101208 9, 397, 13619483, ...
%C A101208 10, 151, 349717, ...
%C A101208 ...
%C A101208 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, ...
%C A101208 (Updated by _Eric Chen_, Jun 01 2015)
%H A101208 Eric Chen, <a href="/A101208/b101208.txt">Table of n, a(n) for n = 1..612</a>
%H A101208 V. Papadimitriou, <a href="http://users.sch.gr/bpapa/morder/morder2.htm">The 1/p ratio of the first hundred million primes</a>
%t A101208 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 *)
%o A101208 (PARI) a(n) = {p=3; ok = 0; until(ok, if (n == (p-1)/znorder(Mod(2, p)), ok = 1, p = nextprime(p+1));); return (p);} \\ _Michel Marcus_, Jun 27 2013
%Y A101208 Cf. A001917, A101209, A054471.
%Y A101208 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 (p-1)/n for n=1 to 11.
%K A101208 nonn,nice,base
%O A101208 1,1
%A A101208 Leigh Ellison (le(AT)maths.gla.ac.uk), Dec 14 2004