login
Palindromic primes with exactly three nonzero digits.
1

%I #17 Sep 08 2022 08:46:16

%S 131,151,181,191,313,353,373,383,727,757,787,797,919,929,10301,10501,

%T 10601,30103,30203,30403,30703,30803,70207,70507,70607,90709,1003001,

%U 1008001,3001003,3002003,3007003,9002009,100030001,100050001,100060001,300020003

%N Palindromic primes with exactly three nonzero digits.

%H James R. Buddenhagen and Giovanni Resta, <a href="/A273049/b273049.txt">Table of n, a(n) for n = 1..148</a> (terms < 10^1000, first 70 terms from J. R. Buddenhagen)

%H Giovanni Resta, <a href="/A273049/a273049.txt">Compact representation of the terms up to 10^20000</a>

%t Reap[ Do[ If[PrimeQ[p = e*(1+10^(2*n)) + m*10^n], Sow@p], {n, 99}, {e, {1, 3, 7, 9}}, {m, 9}]][[2, 1]] (* _Giovanni Resta_, May 14 2016 *)

%o (Magma) [p: p in PrimesUpTo(100000000) | #[d: d in t[1..#t]| d ne 0] eq 3 and p eq Seqint(Reverse(t)) where t is Intseq(p)]; // _Bruno Berselli_, May 16 2016

%Y Subsequence of A002385.

%K nonn,base

%O 1,1

%A _James R. Buddenhagen_, May 13 2016