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.

A103608 Prime centuries with exactly one prime year in each decade.

This page as a plain text file.
%I A103608 #28 May 16 2019 04:54:33
%S A103608 3677,16447,118463,357131,368153,582017,932413,1239443,2284027,
%T A103608 2421473,3900931,4943777,6850463,6966059,10448783,11548777,12849937,
%U A103608 15198811,16031237,17315087,19443679,20075687,20614667,20850223,21392099,22586903,22634153,23013773,24753761
%N A103608 Prime centuries with exactly one prime year in each decade.
%C A103608 Or: Primes p such that there is exactly one prime in each decade [10d-9, 10d] for 10p-9 <= d < 10p. - _M. F. Hasler_, May 02 2019
%e A103608 4073 is not in the sequence because 407203 and 407207 are both prime and in the same decade. 211217 is not in the sequence because 21121691 and 21121697 are both prime and in the same decade. 5046053 is not in the sequence because 504605291 and 504605293 are both prime and in the same decade. - _R. J. Mathar_, May 02 2019
%p A103608 isA103608 := proc(n)
%p A103608     local p,dec ;
%p A103608     if not isprime(n) then
%p A103608         false;
%p A103608     else
%p A103608         p := 100*(n-1) ;
%p A103608         for dec from 0 to 9 do
%p A103608             p := nextprime(p) ;
%p A103608             if modp(floor(p/10),10) <> dec then
%p A103608                 return false;
%p A103608             end if;
%p A103608         end do:
%p A103608         p := nextprime(p) ;
%p A103608         if p > 100*n then
%p A103608             true ;
%p A103608         else
%p A103608             false;
%p A103608         end if;
%p A103608     end if;
%p A103608 end proc:
%p A103608 for i from 1 do
%p A103608     p := ithprime(i) ;
%p A103608     if isA103608(p) then
%p A103608         printf("%d,\n",p) ;
%p A103608     end if;
%p A103608 end do: # _R. J. Mathar_, May 02 2019
%o A103608 (PARI) select( is_A103608(p)={for(k=10*p-9,10*p,#primes([10*k-9,10*k])==1||return);isprime(p)}, primes(10^5)) \\ _M. F. Hasler_, May 02 2019
%Y A103608 Cf. A156115, A307890 (allowing more than one prime in first and last decade).
%K A103608 nonn,less
%O A103608 1,1
%A A103608 _R. J. Mathar_, _M. Hasler_, May 02 2019