login
Numbers k such that prime(k) == 1 (mod 9).
1

%I #19 Sep 08 2022 08:46:16

%S 8,12,21,29,31,38,42,46,58,63,75,78,84,93,99,100,106,112,115,131,134,

%T 141,145,153,157,159,167,169,179,187,191,193,207,211,224,232,242,244,

%U 247,257,260,264,272,276,279,287,303,306,310,316,324,326,327,335,337

%N Numbers k such that prime(k) == 1 (mod 9).

%C The asymptotic density of this sequence is 1/6 (by Dirichlet's theorem). - _Amiram Eldar_, Mar 02 2021

%e a(1) = 8 because prime(8) = 19 and 19 == 1 (mod 9).

%t Select[Range[400], Mod[Prime[#], 9] == 1 &]

%o (Magma) [n: n in [1..500] | NthPrime(n) mod 9 eq 1];

%o (PARI) lista(nn) = for(n=1, nn, if(Mod(prime(n),9)==1, print1(n, ", "))); \\ _Altug Alkan_, Mar 04 2016

%Y The associated primes are in A061237.

%Y Cf. similar sequences listed in A269703.

%K nonn

%O 1,1

%A _Vincenzo Librandi_, Mar 04 2016