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”).

A089227
Numbers k such that 1 + k*ds(k) is prime, where ds(k) is the sum of digits of k.
1
1, 2, 4, 6, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 28, 33, 34, 35, 38, 44, 46, 48, 50, 51, 54, 56, 59, 64, 68, 70, 71, 78, 80, 82, 84, 88, 90, 91, 92, 93, 94, 97, 98, 99, 100, 102, 104, 105, 106, 107, 109, 112, 116, 118, 123, 128, 129, 130, 136, 138, 140, 144, 145
OFFSET
1,2
LINKS
EXAMPLE
10 is in the sequence because A007953(10) = 1 and 1 + 10*1 = 11 is prime.
MAPLE
ds:= n -> convert(convert(n, base, 10), `+`):
filter:= n -> isprime(1+n*ds(n)):
select(filter, [$1..1000]); # Robert Israel, Jun 20 2019
MATHEMATICA
Do[k = Plus @@ IntegerDigits[n]; If[PrimeQ[n*k + 1], Print[n]], {n, 1, 100}] (* Ryan Propper *)
Select[Range[150], PrimeQ[#*Total[IntegerDigits[#]]+1]&] (* Harvey P. Dale, May 25 2024 *)
PROG
(PARI) isok(k) = isprime(1+k*sumdigits(k)); \\ Michel Marcus, Jun 20 2019
(Magma) [k:k in [1..145] | IsPrime(1+k*(&+Intseq(k, 10)))]; // Marius A. Burtea, Jun 21 2019
CROSSREFS
Sequence in context: A321805 A333412 A376150 * A204660 A275956 A109133
KEYWORD
nonn,base
AUTHOR
Yalcin Aktar, Dec 10 2003
EXTENSIONS
More terms from David Wasserman, Aug 31 2005
STATUS
approved