login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A108848 Palindromic primes in which all internal digits are 9. 5

%I #21 Jan 31 2023 08:28:58

%S 191,797,19991,79997,199999991,79999999999999999999999999997,

%T 19999999999999999999999999999999999999991,

%U 199999999999999999999999999999999999999999999999999999999999999999999999999999999999991

%N Palindromic primes in which all internal digits are 9.

%C Obviously, 1 and 7 are the only possible outer digits for repeating inner digit 9.

%C Terms a(14), a(15), and a(16) have respectively 1213, 1285, and 1461 digits. - _Harvey P. Dale_, Dec 11 2019

%H Harvey P. Dale, <a href="/A108848/b108848.txt">Table of n, a(n) for n = 1..13</a>

%t Select[Flatten[Table[FromDigits[PadRight[{k},n,9]]*10+k,{n,2,200},{k,{1,7}}]],PrimeQ] (* _Harvey P. Dale_, Dec 11 2019 *)

%o (PARI) n10np9(n,d) = { local(x,y,k); for(x=1,n, for(k=1,9, y=10^(x+1)*k+(10^x-1)*10+k; if(isprime(y),print1(y",")) ) ) }

%o (Python)

%o from sympy import isprime

%o from itertools import count, islice

%o def agen(): yield from (t for i in count(1) for f in "17" if isprime(t:=int(f + "9"*i + f)))

%o print(list(islice(agen(), 13))) # _Michael S. Branicky_, Jan 27 2023

%Y Similar sequences for digit d: A108845 (d=1), A108846 (d=2), A108841 (d=4), A108842 (d=5), A108843 (d=6), A108844 (d=7), A108847 (d=8), A108848 (d=9).

%K easy,nonn,base

%O 1,1

%A _Cino Hilliard_, Jul 11 2005

%E Name changed by _Arkadiusz Wesolowski_, Sep 07 2011

%E More terms from _Harvey P. Dale_, Dec 11 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 3 18:16 EDT 2024. Contains 374899 sequences. (Running on oeis4.)