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 A111488 #20 Jul 21 2025 16:56:27 %S A111488 3,11,13,31,61,101,103,113,131,163,311,313,331,601,613,631,661,1013, %T A111488 1031,1033,1061,1063,1103,1163,1301,1303,1361,1601,1613,1663,3001, %U A111488 3011,3061,3163,3301,3313,3331,3361,3613,3631,6011,6101,6113,6131,6133,6163 %N A111488 Primes having only {0, 1, 3, 6} as digits. %C A111488 Includes all repunit primes (A004022). Conjecture: an infinite sequence. Note twin primes: (11, 13), (101, 103), (311, 313), (1031, 1033), (1061, 1063), (1301, 1303), (6131, 6133), (10301, 10303), (10331, 10333), (13001, 13003). %C A111488 In other words, primes with digits in the set {0,1,3,6}. - _M. F. Hasler_, Jul 25 2015 %C A111488 The number of 1's in the representation must be either 1 or 2 (mod 3), because otherwise the number would be divisible by 3 (and therefore composite). The only exception is the 3 itself. This excludes basically members of A038603. - _R. J. Mathar_, Jul 25 2015 %H A111488 Robert Israel, <a href="/A111488/b111488.txt">Table of n, a(n) for n = 1..10000</a> %H A111488 <a href="/index/Pri#PrimesWithDigits">Index to entries for primes with digits in a given set</a> %p A111488 f:= proc(x) local L,p; %p A111488 L:= subs([3=6,2=3],convert(x,base,4)); %p A111488 p:= add(L[i]*10^(i-1),i=1..nops(L)); %p A111488 if isprime(p) then p fi %p A111488 end proc: %p A111488 map(f, [$1..4^4]); # _Robert Israel_, Dec 18 2018 %t A111488 Select[Prime@ Range@ 1000, SubsetQ[{0, 1, 3, 6}, IntegerDigits@ #] &] (* _Michael De Vlieger_, Jul 25 2015 *) %o A111488 (PARI) A111488={(n, show=0, L=[0,1,3,6])->my(t); for(d=1,1e9,u=vector(d, i, 10^(d-i))~; forvec(v=vector(d,i,[1+(i==1&&!L[1]), #L]), ispseudoprime(t=vector(d, i, L[v[i]])*u)||next; show&print1(t", "); n--||return(t)))} \\ _M. F. Hasler_, Jul 25 2015 %Y A111488 Cf. A000040, A000217, A004022, A038603. %Y A111488 Cf. also A020450 - A020472, A036953, A260044, A260267 - A260271, A199325 - A199329, A061247, A199340 - A199349. %K A111488 base,easy,nonn %O A111488 1,1 %A A111488 _Jonathan Vos Post_, Nov 15 2005 %E A111488 Corrected by _Ray Chandler_, Nov 19 2005 %E A111488 Name changed by _Sean A. Irvine_, Jul 21 2025