login
A118756
a(n) = smallest prime p such that p is the home prime (cf. A037274) of exactly n natural numbers.
29
2, 23, 211, 379, 773, 3389, 23251, 3761, 178069, 77773, 379811, 378997, 747521, 2337691, 3789293, 3574657
OFFSET
1,1
COMMENTS
a(17) > 10^7, a(18) = 3784463. - Robert G. Wilson v, Oct 01 2007
FORMULA
a(n) = A037274(A215408(n)). - Jonathan Sondow, Aug 09 2012
EXAMPLE
23 is the home prime of both 6 and 23, thus a(2) = 23; 211 is the home prime of 4, 22 and 211, thus a(3) = 211.
More compactly: (2) -> 2, (6,23) -> 23, (4,22,211) -> 211,
(42,74,237,379) -> 379, (10,25,55,511,773) -> 773,
(118, 259, 737, 801, 1167, 3389) -> 3389,
{250, 1506, 2555, 3865, 5773, 6502, 23251} -> 23251,
{140, 332, 514, 566, 1281, 2257, 2283, 3761} -> 3761,
{4206, 7402, 10786, 16123, 23701, 25393, 67379, 137173, 178069} -> 178069,
{3786, 7262, 10078, 14513, 18417, 23631, 25039, 32449, 37877, 77773} -> 77773,
{41933, 50161, 56598, 103487, 192207, 206031, 216959, 239433, 307369, 363007, 379811} -> 379811,
{1798, 5982, 22931, 23997, 41315, 53033, 58263, 181293, 184102, 292051, 319421, 378997} -> 378997,
{722, 4938, 5718, 7646, 18929, 21919, 23823, 23953, 91277, 97941, 171409, 332647, 747521} -> 747521,
{87066, 128055, 138438, 153402, 175611, 226146, 358537, 465734, 588041, 675382, 866893, 1792003, 1564051, 2337691} -> 2337691,
{8691, 9725, 23585, 31437, 32897, 55389, 67491, 144995, 168163, 337499, 547617, 964849, 1875153, 3303841, 3789293} -> 3789293,
{5978, 10654, 27761, 40307, 47985, 111855, 156657, 172371, 202881, 250519, 357457, 379661, 407507, 488985, 1723971, 3574657} -> 3574657, etc. - Robert G. Wilson v, Oct 01 2007
MATHEMATICA
lst = {}; f[n_] := FromDigits@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@n, 2]; h[n_] := NestWhileList[f@# &, n, !PrimeQ@# &, 1, 28]; Do[p = h[n][[ -1]]; If[ PrimeQ@p && p < 10^7 && p != n, Print[{n, p}]; AppendTo[lst, p]], {n, 2, 10^7}];
lst = Sort@ lst; Table[d = n - 2; lsu = {}; Do[If[lst[[n]] == lst[[n + d]] && lst[[n - 1]] != lst[[n]] && lst[[n]] != lst[[n + d + 1]], AppendTo[lsu, lst[[n]] ]], {n, 188004 - d - 1}]; First@ Union@ lsu, {n, 3, 16}] (* Robert G. Wilson v, Oct 01 2007 *)
KEYWORD
nonn,base
AUTHOR
William Lindgren (william.lindgren(AT)sru.edu), Sep 04 2007, corrected Sep 15 2007
EXTENSIONS
a(7)-a(16) from Robert G. Wilson v, Sep 27 2007, Oct 01 2007
STATUS
approved