login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
23, 29, 313, 397, 431, 661, 941, 1129, 1193, 1223, 1277, 1613, 2621, 2791, 3461, 4111, 4159, 12641, 12911, 14419, 15271, 19211, 21611, 21773, 22613, 26731, 29819, 31181, 31511, 41381, 61211, 74611, 111191, 115811, 121181, 121727, 141161, 141221, 141269, 145513, 157523, 171713, 173141, 173891 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Since p mod 0 is not defined, the digit 0 is not allowed.
LINKS
EXAMPLE
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.
MAPLE
filter:= proc(p) local L, s, t, q;
L:= convert(p, base, 10);
s:= convert(L, `+`);
t:= convert(L, `*`);
if t = 0 then return false fi;
q:= p mod s;
isprime(q) and (p mod t) = nextprime(q)
end proc:
select(filter, [seq(ithprime(i), i=1..20000)]);
PROG
(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
CROSSREFS
Sequence in context: A232726 A029541 A068714 * A036267 A107934 A356087
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, May 09 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)