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.

A384735 Numbers that are prime or end in a prime number (of any length).

This page as a plain text file.
%I A384735 #49 Jun 20 2025 20:23:02
%S A384735 2,3,5,7,11,12,13,15,17,19,22,23,25,27,29,31,32,33,35,37,41,42,43,45,
%T A384735 47,52,53,55,57,59,61,62,63,65,67,71,72,73,75,77,79,82,83,85,87,89,92,
%U A384735 93,95,97,101,102,103,105,107,109,111,112,113,115,117
%N A384735 Numbers that are prime or end in a prime number (of any length).
%C A384735 If k is a term, so is m*10^A055642(k) + k for all m > 0. - _Michael S. Branicky_, Jun 10 2025
%H A384735 Mohd Anwar Jamal Faiz, <a href="https://arxiv.org/abs/2506.10585">Primender Sequence: A Novel Mathematical Construct for Testing Symbolic Inference and AI Reasoning</a>, arXiv:2506.10585 [cs.AI], 2025. See pp. 4, 9.
%e A384735 2, 3, 5, 7 and 11 are terms since they are prime.
%e A384735 15 is a term since it ends in the prime 5.
%e A384735 111 is a term since it ends in the prime 11.
%p A384735 q:= n-> isprime(n) or (k-> k>1 and q(n mod 10^(k-1)))(length(n)):
%p A384735 select(q, [$1..150])[];  # _Alois P. Heinz_, Jun 08 2025
%t A384735 q[n_] := AnyTrue[Range[1, IntegerLength[n]-1], PrimeQ[Mod[n, 10^#]] &]; Select[Range[120], PrimeQ[#] || q[#] &] (* _Amiram Eldar_, Jun 10 2025 *)
%o A384735 (Python)
%o A384735 from sympy import isprime
%o A384735 def ok(n):
%o A384735     s = str(n)
%o A384735     return any(isprime(int(s[i:])) for i in range(len(s)))
%o A384735 print([k for k in range(118) if ok(k)])
%o A384735 (PARI) isok(x) = my(y=x, nb=0); while(y>1, y/=10; nb++; if (isprime(x%(10^nb)), return(1))); \\ _Michel Marcus_, Jun 10 2025
%Y A384735 Cf. A000040, A033664, A055642.
%Y A384735 Contains A017293, A017305, A017329, A017353.
%K A384735 nonn,base
%O A384735 1,1
%A A384735 _Mohd Anwar Jamal Faiz_, Jun 08 2025