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.

A036931 Smallest n-digit prime containing only digits 1 and 4, or 0 if no such prime exists.

This page as a plain text file.
%I A036931 #10 Mar 09 2020 09:12:33
%S A036931 0,11,0,4111,11411,0,1114111,11111141,0,1111111411,11111141411,0,
%T A036931 1111111111441,11111111111411,0,1111111111114441,11111111111414411,0,
%U A036931 1111111111111111111,11111111111111414441,0,1111111111111111144141
%N A036931 Smallest n-digit prime containing only digits 1 and 4, or 0 if no such prime exists.
%C A036931 For any positive integer k, a(3k) = 0 as any 3k-digit number containing only digits 1 or 4 or both has a digit-sum divisible by 3 and thus the number is divisible by 3. - _Rick L. Shepherd_, Feb 08 2004
%H A036931 Jinyuan Wang, <a href="/A036931/b036931.txt">Table of n, a(n) for n = 1..1000</a>
%F A036931 a(3k) = 0 and a(A004023(k)) = (10^A004023(k) - 1)/9 = A004022(k) for all positive integers k. - _Rick L. Shepherd_, Feb 08 2004
%t A036931 Flatten[Table[Select[FromDigits/@Tuples[{1, 4}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* _Jinyuan Wang_, Mar 09 2020 *)
%Y A036931 Cf. A020452, A036304, A036229.
%Y A036931 Cf. A004022 (repunit primes), A004023.
%K A036931 nonn,base
%O A036931 1,2
%A A036931 _Patrick De Geest_, Jan 04 1999
%E A036931 More terms from _Rick L. Shepherd_, Feb 08 2004