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.

A185682 Irregular triangle, read by rows, of primes with prefix n and digits "1" appended, otherwise 0.

This page as a plain text file.
%I A185682 #25 Sep 06 2024 14:15:24
%S A185682 11,0,31,311,41,0,61,71,0,0,101,0,0,131,0,151,1511,0,0,181,1811,191,0,
%T A185682 211,2111,0,0,241,2411,251,0,271,2711,281,0,0,311,0,331,0,0,0,0,0,0,
%U A185682 401,0,421,4211,431,0,0,461,0,0,491,0,0,521,0,541,0,0,571,5711,0,0,601,6011,0,0
%N A185682 Irregular triangle, read by rows, of primes with prefix n and digits "1" appended, otherwise 0.
%C A185682 Row n ends when a composite number is found.
%C A185682 No row has more than two terms. - _Robert Israel_, Sep 06 2024
%e A185682 For k=1..2, a(15, k) = {151, 1511} are in the sequence.
%e A185682 Triangle begins:
%e A185682    11;
%e A185682     0;
%e A185682    31, 311;
%e A185682    41;
%e A185682     0;
%e A185682    61;
%e A185682    71;
%e A185682     0;
%e A185682     0;
%e A185682   101;
%e A185682   ...
%p A185682 with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
%p A185682   while (id=0) do:a1:=a0*10+1:if type(a1,prime)=true then a0:=a1:printf(`%d, `,a0):c:=c+1:else
%p A185682   id:=1:fi:od:if c=0 then printf(`%d, `,0):else fi:od:~
%t A185682 Reap[Do[cnt = 0; d = IntegerDigits[n]; While[p = FromDigits[AppendTo[d, 1]]; PrimeQ[p], cnt++; Sow[p]]; If[cnt == 0, Sow[0]], {n, 61}]][[2, 1]]
%Y A185682 Cf. A069568 (least number of 1's to append to n to make a prime).
%K A185682 nonn,base,less,tabf
%O A185682 1,1
%A A185682 _Michel Lagneau_, Feb 10 2011