cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A087633 Number of n-digit primes ending in 9 in base 10.

This page as a plain text file.
%I A087633 #25 Aug 07 2018 11:25:55
%S A087633 0,5,33,265,2087,17203,146439,1274154,11271147,101049993,915748570,
%T A087633 8372464236,77114396969
%N A087633 Number of n-digit primes ending in 9 in base 10.
%F A087633 From _Iain Fox_, Aug 07 2018: (Start)
%F A087633 a(n) ~ (1/4) * Integral_{x=10^(n-1)..10^n} (dx/log(x)).
%F A087633 a(n) = A006879(n) - A087630(n) - A087631(n) - A087632(n), for n > 1.
%F A087633 (End)
%e A087633 a(2) = 5 as there exist 5 two-digit prime numbers (19, 29, 59, 79, and 89) with units place 9.
%e A087633 a(3) = 33, since there are 33 three-digit numbers with units place digit as 9.
%t A087633 Table[Length[Select[Range[10^n + 9, 10^(n + 1) - 1, 10], PrimeQ]], {n, 5}] (* _Alonso del Arte_, Apr 27 2014 *)
%o A087633 (Java) /** The terms of the sequences are generated by changing the range for j for the various numbers of digits. E.g., it ranges from 100 to 999 for three-digit numbers. */
%o A087633 float r, x;
%o A087633 int c = 0, count = 0; for (float j = 100f; j < 1000f; j++) { for (float i = 2f; i < j; i++) { r = j % i; if (r == 0) c = 1; } if (c == 0) { x = j % 10; if (x == 9) count = count + 1; } c = 0; } System.out.println("count = " + count);
%o A087633 (PARI) a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==9, c++)); c \\ _Iain Fox_, Aug 07 2018
%Y A087633 Cf. A006879, A073508, A087630, A087631, A087632.
%K A087633 nonn,base,hard,more
%O A087633 1,2
%A A087633 Meenakshi Srikanth (menakan_s(AT)yahoo.com) and _Amarnath Murthy_, Sep 15 2003
%E A087633 Corrected and extended by _Ray Chandler_, Oct 04 2003
%E A087633 Offset corrected by _Iain Fox_, Aug 07 2018
%E A087633 a(11) from _Iain Fox_, Aug 07 2018
%E A087633 a(12)-a(13) from _Giovanni Resta_, Aug 07 2018