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.

A108841 Palindromic primes in which all internal digits are 4.

This page as a plain text file.
%I A108841 #30 Jan 28 2023 10:36:56
%S A108841 1444441,3444443,74444444447,3444444444443,
%T A108841 7444444444444444444444444444447,
%U A108841 1444444444444444444444444444444444444444444444444444444444444444441
%N A108841 Palindromic primes in which all internal digits are 4.
%C A108841 The next term has 121 digits. - _Harvey P. Dale_, Nov 26 2014
%C A108841 a(10) has 1255 digits, and thus is too big for a b-file. - _Robert Israel_, Oct 25 2018
%H A108841 Robert Israel, <a href="/A108841/b108841.txt">Table of n, a(n) for n = 1..9</a>
%p A108841 select(isprime, [seq(seq(x*(10^d+1)+40*(10^(d-1)-1)/9,x=1..9,2),d=2..66)]); # _Robert Israel_, Oct 25 2018
%t A108841 Sort[Select[FromDigits/@Flatten[Table[Join[{n},PadRight[{},i,4],{n}],{n,{1,3,7,9}},{i,150}],1],PrimeQ]] (* _Harvey P. Dale_, Nov 26 2014 *)
%o A108841 (PARI) n10np1(n,d) = { local(x,y,k); for(x=1,n, for(k=1,8, y=10^(x+1)*k+floor(10^x*d/9)*10+k; if(isprime(y),print1(y",")) ) ) }
%o A108841 (Python)
%o A108841 from sympy import isprime
%o A108841 from itertools import count, islice
%o A108841 def agen(): yield from (t for i in count(1) for f in "1379" if isprime(t:=int(f + "4"*i + f)))
%o A108841 print(list(islice(agen(), 9))) # _Michael S. Branicky_, Jan 27 2023
%Y A108841 Similar sequences for digit d: A108845 (d=1), A108846 (d=2), A108842 (d=5), A108843 (d=6), A108844 (d=7), A108847 (d=8).
%K A108841 nonn,base
%O A108841 1,1
%A A108841 _Cino Hilliard_, Jul 11 2005
%E A108841 Name changed by _Arkadiusz Wesolowski_, Sep 07 2011