login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A107836
Slowest increasing sequence where a(n)+(first digit of a(n)) is prime.
3
1, 10, 12, 16, 18, 21, 27, 29, 34, 38, 43, 49, 54, 56, 61, 65, 67, 72, 76, 81, 89, 92, 94, 98, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 209, 221, 225, 227, 231, 237, 239, 249, 255, 261, 267, 269, 275
OFFSET
1,2
LINKS
EXAMPLE
1 + 1 = 2, which is prime; 10 + 1 = 11, which is prime; 12 + 1 = 13, which is prime; 16 + 1 = 17, which is prime; 18 + 1 = 19, which is prime; 21 + 2 = 23, which is prime; etc.
MAPLE
select(t -> isprime(t + floor(t/10^ilog10(t))), [$1..1000]); # Robert Israel, May 05 2020
MATHEMATICA
Select[ Range[280], PrimeQ[ # + IntegerDigits[ # ][[1]]] &] (* Robert G. Wilson v, Jun 14 2005 *)
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
an = 0
while True:
an = next(k for k in count(an+1) if isprime(k + int(str(k)[0])))
yield an
print(list(islice(agen(), 58))) # Michael S. Branicky, Oct 03 2024
CROSSREFS
Sequence in context: A057485 A162825 A376372 * A096128 A334939 A063192
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Jun 11 2005
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jun 14 2005
STATUS
approved