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.

A344127 Primes p such that (p mod s) and (p mod t) are consecutive primes, where s is the sum of the digits of p and t is the product of the digits of p.

This page as a plain text file.
%I A344127 #17 May 11 2021 09:05:12
%S A344127 23,29,313,397,431,661,941,1129,1193,1223,1277,1613,2621,2791,3461,
%T A344127 4111,4159,12641,12911,14419,15271,19211,21611,21773,22613,26731,
%U A344127 29819,31181,31511,41381,61211,74611,111191,115811,121181,121727,141161,141221,141269,145513,157523,171713,173141,173891
%N A344127 Primes p such that (p mod s) and (p mod t) are consecutive primes, where s is the sum of the digits of p and t is the product of the digits of p.
%C A344127 Since p mod 0 is not defined, the digit 0 is not allowed.
%H A344127 Robert Israel, <a href="/A344127/b344127.txt">Table of n, a(n) for n = 1..1000</a>
%e A344127 a(3) = 313 is a term because with s = 3+1+3 = 7 and t = 3*1*3 = 9, 313 mod 7 = 5 and 313 mod 9 = 7 are consecutive primes.
%p A344127 filter:= proc(p) local L,s,t,q;
%p A344127   L:= convert(p,base,10);
%p A344127   s:= convert(L,`+`);
%p A344127   t:= convert(L,`*`);
%p A344127   if t = 0 then return false fi;
%p A344127   q:= p mod s;
%p A344127   isprime(q) and (p mod t) = nextprime(q)
%p A344127 end proc:
%p A344127 select(filter, [seq(ithprime(i),i=1..20000)]);
%o A344127 (PARI) isok(p) = if (isprime(p), my(d=digits(p)); vecmin(d) && isprime(q=(p%vecsum(d))) && isprime(r=(p%vecprod(d))) && (nextprime(q+1)==r)); \\ _Michel Marcus_, May 10 2021
%Y A344127 Cf. A007605, A053666, A136251.
%K A344127 nonn,base
%O A344127 1,1
%A A344127 _J. M. Bergot_ and _Robert Israel_, May 09 2021