login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A266815
Primes whose sum of reciprocal of digits is a prime.
2
11, 2441, 3313, 3331, 4241, 4421, 12163, 12613, 13313, 13331, 16231, 16363, 16633, 21163, 21613, 26113, 31663, 32233, 32323, 32611, 33113, 33223, 33311, 48281, 48821, 61231, 61363, 62131, 62311, 63211, 63361, 88241, 112121, 114643, 116443, 122263, 123323, 126223
OFFSET
1,1
COMMENTS
Subset of A034708.
LINKS
EXAMPLE
11: 1/1 + 1/1 = 2;
2441: 1/2 + 1/4 + 1/4 + 1/1 = 2;
3313: 1/3 + 1/3 + 1/1 + 1/3 = 2; etc.
MAPLE
P:=proc(q) local a, k, n, ok;
for n from 1 to q do if isprime(n) then ok:=1; a:=0; for k from 0 to ilog10(n) do
if trunc(n/10^k) mod 10>0 then a:=a+1/(trunc(n/10^k) mod 10) else ok:=0; break; fi; od;
if ok=1 and type(a, integer) then if isprime(a) then print(n) fi; fi; fi; od; end: P(10^9);
# Alternative:
N:= 8: # to get all terms of up to N digits
S1:= proc(t, k, N)
option remember;
if t = 0 then {[]}
elif k = 0 then {}
else
`union`(seq(map(p -> [op(p), k$m], procname(t - m*2520/k, k-1, N-m)),
m = 0 .. min(N, floor(t*k/2520))))
fi
end proc:
targets:= 2520*select(isprime, [$2..N]):
Dlists:= select(p -> convert(p, `+`) mod 3 <> 0, `union`(seq(S1(t, 9, N), t=targets))):
g:= proc(L) local i, m;
m:= nops(L);
op(select(isprime, map(t -> add(t[i]*10^(i-1), i=1..m), combinat:-permute(L))));
end proc:
sort(convert(map(g, Dlists), list)); # Robert Israel, Feb 12 2016
MATHEMATICA
Select[Prime@ Range@ 12000, If[MemberQ[#, 0], False, PrimeQ@ Total[1/#]] &@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 12 2016 *)
PROG
(PARI) isok(n) = if (isprime(n), my(d = digits(n)); vecmin(d) && (denominator(s=sum(k=1, #d, 1/d[k])) == 1) && isprime(s)) \\ Michel Marcus, Feb 12 2016
CROSSREFS
Sequence in context: A379988 A085878 A238633 * A064779 A239897 A138075
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Feb 12 2016
STATUS
approved