%I #13 Jul 19 2015 01:53:51
%S 2,3,5,7,11,101,787,929,32323,36563,70507,72727,74747,78487,78787,
%T 1278721,3212123,3218123,3252523,3256523,3258523,3272723,3618163,
%U 3670763,3698963,7014107,7036307,7096907,7434347,7436347,7472747
%N Palindromic primes n such that the period of 1/n is a palindrome.
%C Number of terms < 10^n: 4, 5, 8, 8, 15, 15, 40, 40, 117, 117, 441, 441, 1720, 1720, 7152, 7152, 33598, 33598, ..., . - _Robert G. Wilson v_, Jul 19 2015
%D Calculated by _Jud McCranie_
%H Robert G. Wilson v, <a href="/A033938/b033938.txt">Table of n, a(n) for n = 1..33599</a>
%t (* copy nthPalindrome from A002113*) palQ[n_] := Block[{}, Reverse[idn = IntegerDigits@ n] == idn]; digitCycleLength[r_Rational, b_Integer?Positive] := MultiplicativeOrder[b, FixedPoint[Quotient[#, GCD[#, b]] &, Denominator[r]]] (* from Mathematica help file for MultiplicativeOrder *); k = 1; lst = {}; While[k < 10000, p = nthPalindrome[k]; If[ PrimeQ@ p && palQ[ digitCycleLength[1/p, 10]], AppendTo[lst, p]]; k++]; lst (* _Robert G. Wilson v_, Jul 19 2015 *)
%Y Cf. A002385 and A033939.
%K nonn,base
%O 1,1
%A Proposed by _G. L. Honaker, Jr._
|