login
Primes such that iterated sum-of-digits (A038194) is odd.
3

%I #20 Sep 08 2022 08:45:08

%S 3,5,7,19,23,37,41,43,59,61,73,79,97,109,113,127,131,149,151,163,167,

%T 181,199,223,239,241,257,271,277,293,307,311,313,331,347,349,367,379,

%U 383,397,401,419,421,433,439,457,487,491,509,523,541,547,563,577,599

%N Primes such that iterated sum-of-digits (A038194) is odd.

%C Subsequence of primes of A187318. - _Michel Marcus_, Jun 08 2015

%C Primes congruent to 1, 3, 5, 7 mod 18. - _Robert Israel_, Jun 08 2015

%H Robert Israel, <a href="/A079131/b079131.txt">Table of n, a(n) for n = 1..10000</a>

%p select(isprime, [3, seq(seq(i*18+j, j=[1,5,7]),i=0..100)]); # _Robert Israel_, Jun 08 2015

%t Select[Prime[Range[120]], OddQ[Mod[#, 9]] &] (* _Bruno Berselli_, Aug 31 2012 *)

%o (PARI) forprime(p=2,600,if((p%9)%2==1,print1(p,",")))

%o (Magma) [p: p in PrimesUpTo(600) | p mod 18 in [1,3,5,7]]; // _Vincenzo Librandi_, Jun 07 2015

%o (Magma) [a: n in [0..1000] | IsPrime(a) where a is Floor(9*n/5)]; // _Vincenzo Librandi_, Jun 08 2015

%Y Cf. A038194, A078403, A079130, A079132, A187318.

%K nonn,easy,base

%O 1,1

%A _Klaus Brockhaus_, Dec 28 2002