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.

A374897 a(n) is the least semiprime that ends with n, or -1 if there is no such semiprime.

This page as a plain text file.
%I A374897 #15 Jul 24 2024 17:33:38
%S A374897 10,21,22,33,4,15,6,57,38,9,10,111,-1,213,14,15,-1,217,118,119,-1,21,
%T A374897 22,123,-1,25,26,327,-1,129,-1,731,-1,33,34,35,-1,237,38,39,-1,141,
%U A374897 142,143,-1,145,46,247,-1,49,-1,51,-1,253,254,55,-1,57,58,159,-1,161,62,763,-1,65,166,267,-1,69
%N A374897 a(n) is the least semiprime that ends with n, or -1 if there is no such semiprime.
%C A374897 a(n) = -1 if n > 10 and n is divisible by 4 or 10, or n > 25 and n is divisible by 25.  Otherwise a(n) > 0 (which can be proven using Dirichlet's theorem on primes in arithmetic progressions).
%H A374897 Robert Israel, <a href="/A374897/b374897.txt">Table of n, a(n) for n = 0..10000</a>
%e A374897 a(5) = 15 because 15 = 3*5 is a semiprime and ends in 5.
%p A374897 f:= proc(n) local x,d;
%p A374897   if (n mod 4 = 0 and n > 10) or (n mod 10 = 0) or (n mod 25 = 0) then return -1 fi;
%p A374897   d:= 10^(1+ilog10(n));
%p A374897   for x from n by d do
%p A374897     if numtheory:-bigomega(x) = 2 then return x fi
%p A374897   od
%p A374897 end proc:
%p A374897 f(0):= 10:
%p A374897 f(10):= 10:
%p A374897 f(25):= 25:
%p A374897 map(f, [$1..100]);
%Y A374897 Cf. A001358, A070277, A374899.
%K A374897 sign,base,look
%O A374897 0,1
%A A374897 _Zak Seidov_ and _Robert Israel_, Jul 22 2024