OFFSET
1,1
COMMENTS
Is the digit sum of each term even?
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
EXAMPLE
223 has digit sum 7, which divides 224. - D. S. McNeil, May 23 2010
MAPLE
read(transforms): A178150 := proc(n) option remember: local p: if(n=1)then return 11: fi: p:=procname(n-1): do p:=nextprime(p): if((p+1) mod digsum(p) = 0)then return p: fi: od: end: seq(A178150(n), n=1..68); # Nathaniel Johnston, May 28 2011
MATHEMATICA
Select[Prime[Range[400]], Mod[# + 1, Total[IntegerDigits[#]]] == 0 &] (* Vincenzo Librandi, Dec 21 2018 *)
PROG
(Magma) [n: n in PrimesUpTo(3000)|IsIntegral((n+1)/&+Intseq(n))]; // Marius A. Burtea, Dec 17 2018
(PARI) is(n) = isprime(n) && !((n+1) % vecsum(digits(n))) \\ David A. Corneth, Dec 18 2018
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Giovanni Teofilatto, May 21 2010
EXTENSIONS
Extended by D. S. McNeil, May 23 2010
STATUS
approved