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.

A227948 Zeroless numbers n such that n + (product of digits of n) and n - (product of digits of n) are prime.

This page as a plain text file.
%I A227948 #21 May 22 2025 10:21:35
%S A227948 21,23,27,29,81,83,253,293,299,343,347,349,431,437,439,471,473,477,
%T A227948 529,623,653,659,677,743,893,1123,1219,1253,1257,1297,1423,1489,1521,
%U A227948 1523,1529,1587,1589,1657,1763,1853,1867,1927,2151,2167,2239,2277,2279,2321,2327,2329,2377,2413,2443,2459,2467,2497,2543,2569
%N A227948 Zeroless numbers n such that n + (product of digits of n) and n - (product of digits of n) are prime.
%C A227948 Intersection of A157676 and A229221 (without the primes containing zero digits).
%e A227948 29 - 2*9 = 11 (prime) and 29 + 2*9 = 47 (prime) so 29 is a member of this sequence.
%e A227948 743 - 7*4*3 = 659 (prime) and 743 + 7*4*3 = 827 (prime) so 743 is a member of this sequence.
%o A227948 (Python)
%o A227948 from sympy import isprime
%o A227948 def DP(n):
%o A227948   p = 1
%o A227948   for i in str(n):
%o A227948     p *= int(i)
%o A227948   return p
%o A227948 {print(n,end=', ') for n in range(5000) if DP(n) and isprime(n+DP(n)) and isprime(n-DP(n))}
%o A227948 ## Simplified by _Derek Orr_, Apr 05 2015
%o A227948 (PARI) for(n=1,5000,d=digits(n);p=prod(i=1,#d,d[i]);if(p&&isprime(n+p)&&isprime(n-p),print1(n,", "))) \\ _Derek Orr_, Apr 05 2015
%Y A227948 Cf. A157676, A229221, A007954, A052382.
%K A227948 nonn,base,easy
%O A227948 1,1
%A A227948 _Derek Orr_, Oct 04 2013
%E A227948 More terms from _Derek Orr_, Apr 05 2015