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.

Showing 1-1 of 1 results.

A269930 Primes whose digits are all prime, sum of digits is prime and sum of reciprocals of digits is also prime.

Original entry on oeis.org

32233, 32323, 33223, 2222333, 2223233, 2232323, 2233223, 3223223, 272777777, 277727777, 722777777, 772277777, 772777727, 777727277, 777777227, 33333555553, 33355535533, 33355553353, 33533555353, 33553353553, 33553553353, 33553553533, 33555353353, 33555533533, 35335355353, 35335533553, 35353335553
Offset: 1

Views

Author

Paolo P. Lava, Mar 08 2016

Keywords

Comments

Intersection of A019546, A046704, A266815.
Furthermore, 32233, 32323 and 2223233 are primes with prime subscripts (A006450). In fact, 32233 is the 3457th prime, 32323 is the 3467th prime, and 2223233 is the 164239th prime.

Examples

			32233 is prime, its digits are primes (2 and 3), their sum is prime (3 + 2 + 2 + 3 + 3 = 13) and the sum of reciprocal of digits is also prime (1/3 + 1/2 + 1/2 + 1/3 + 1/3 = 2).
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,b, k,ok, ok2, n;
    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 a:=0; b:=n; ok2:=1;
    for k from 1 to ilog10(n)+1 do if isprime(b mod 10) then a:=a+(b mod 10); b:=trunc(b/10);
    else ok2:=0; break; fi; od; if ok2=1 and isprime(a) then print(n); fi; fi; fi; fi; od; end: P(10^9);
  • Mathematica
    Select[Select[Flatten@ Map[Map[FromDigits, Tuples[{2, 3, 5, 7}, #]] &, Range@ 11], PrimeQ], And[PrimeQ[Total@ #], PrimeQ[Total[1/#]]] &@ IntegerDigits@ # &] (* Michael De Vlieger, Mar 08 2016 *)

Extensions

More terms from Michael De Vlieger, Mar 08 2016
Showing 1-1 of 1 results.