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.
%I A376689 #10 Oct 02 2024 12:32:06 %S A376689 2,21,711,240111,51111,45411111,16059111111,43761111111,2121411111111, %T A376689 328203111111111,11862441111111111,37253511111111111, %U A376689 10630644111111111111,141896571111111111111,17806995411111111111111,9675948111111111111111,11187474501111111111111111,235460890911111111111111111 %N A376689 a(n) is the first number that is a prime times 3^n and ends in exactly n 1's. %H A376689 Robert Israel, <a href="/A376689/b376689.txt">Table of n, a(n) for n = 0..672</a> %e A376689 a(3) = 240111 because 240111 = 3^3 * 8893 with 8893 prime and 240111 ends with three 1's. %e A376689 a(12) = 10630644111111111111, not 3721911111111111111, because although 3721911111111111111 = 3^12 * 7003432386871 with 7003432386871 prime, 3721911111111111111 ends in 14 1's rather than just 12. %p A376689 f:= proc(n) local x0,p; %p A376689 x0:= -(1-10^(-n))/9 mod 3^n; %p A376689 for p from x0*10^n+(10^n-1)/9 by 30^n do if isprime(p/3^n) and p mod 10^(n+1) <> (10^(n+1)-1)/9 then return p fi od %p A376689 end proc; %p A376689 map(f, [$0..20]); %Y A376689 Cf. A065821. %K A376689 nonn,base %O A376689 0,1 %A A376689 _Robert Israel_, Oct 01 2024