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 A375552 #38 Jun 21 2025 07:54:22 %S A375552 2,5,3,7,19,31,11,17,13,29,23,41,47,139,61,37,53,67,59,43,89,103,109, %T A375552 83,73,97,79,101,71,131,167,137,107,199,163,151,191,233,113,127,227, %U A375552 211,179,173,239,157,193,149,181,277,313,197,223,307,251,271,331,263,241,229,349 %N A375552 Yet unseen terms in the enumeration of A375553, prepended by [2, 5]. %C A375552 Conjecture: This is a permutation of the prime numbers. %H A375552 Chai Wah Wu, <a href="/A375552/b375552.txt">Table of n, a(n) for n = 1..242</a> %p A375552 aList := proc(upto) local P, p, q, Y; Y := 2,5; %p A375552 P := select(isprime, [seq(2..upto)]): %p A375552 for p in P do for q in P do %p A375552 if isprime(q+(p+q)*10^(1+ilog10(q))) then break fi od: %p A375552 if not member(q, [Y]) then Y := Y,q fi od; %p A375552 Y end: aList(100000); %t A375552 spq[p_] := Module[{k = 2}, While[!PrimeQ[(p + k)*10^IntegerLength[k] + k], k = NextPrime[k]]; k]; %t A375552 Join[{2, 5}, DeleteDuplicates @ Table[spq[p], {p, Prime[Range[30000]]}]] %t A375552 (* _Jean-François Alcover_, Oct 01 2024, after _Harvey P. Dale_ in A375553 *) %o A375552 (SageMath) %o A375552 from more_itertools import unique_everseen %o A375552 def f(p): %o A375552 for q in Primes(): %o A375552 if is_prime(q + (p + q)*10^(1 + int(log(q, 10)))): return q %o A375552 a = lambda n: unique_everseen((f(p) for p in prime_range(n))) %o A375552 print([2, 5] + list(a(999))) %o A375552 (PARI) %o A375552 f(n) = my(k=2); while (!isprime(eval(concat(Str(prime(n)+k), Str(k)))), k = nextprime(k+1)); k; \\ A375553 %o A375552 lista(nn) = my(list=List()); listput(list, 2); listput(list, 5); for (n=1, nn, my(k=f(n)); if (#select(x->(x==k), Vec(list)) == 0, listput(list, k));); Vec(list); \\ _Michel Marcus_, Sep 17 2024 %o A375552 (Python) %o A375552 from itertools import count, islice %o A375552 from sympy import isprime, nextprime %o A375552 def A375552_gen(): # generator of terms %o A375552 p, a = 2, set() %o A375552 yield from (2,5) %o A375552 while True: %o A375552 q, m = 2, 10 %o A375552 for l in count(1): %o A375552 while q<m: %o A375552 if isprime(m*(p+q)+q): %o A375552 if q not in a: %o A375552 yield q %o A375552 a.add(q) %o A375552 break %o A375552 q = nextprime(q) %o A375552 else: %o A375552 m *= 10 %o A375552 continue %o A375552 break %o A375552 p = nextprime(p) %o A375552 A375552_list = print(list(islice(A375552_gen(),61))) # _Chai Wah Wu_, Sep 18 2024 %Y A375552 Cf. A000040, A375553, A174414, A055642. %K A375552 nonn %O A375552 1,1 %A A375552 _Peter Luschny_, Sep 17 2024