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.

A360497 Maximal sequence of primes whose digits are primes and whose digit sum is also a term.

This page as a plain text file.
%I A360497 #34 Mar 05 2023 19:49:45
%S A360497 2,3,5,7,23,223,2777,7727,27527,33377,33773,35537,35573,35753,37337,
%T A360497 52727,55337,55373,55733,73553,75227,75353,75533,222557,222773,223277,
%U A360497 225257,225527,233357,235337,235553,253553,253733,277223,322727,323537,332573,335273
%N A360497 Maximal sequence of primes whose digits are primes and whose digit sum is also a term.
%C A360497 The sequence is maximal in the sense that a nonempty set of primes cannot be added consistently.
%e A360497 2 is a term because it is a prime with prime digits only and its digit sum 2 is also a term.
%e A360497 227 is not a term because the digit sum is 11 which is not a term because it has nonprime digits.
%e A360497 27527 is a term: it is a prime, each digit (2,5,7) is also a prime, and the sum of the digits (2+7+5+2+7 = 23) is also in the sequence.
%p A360497 R:= {2,3,5,7}: count:= 4:
%p A360497 S:= [2,3,5,7];
%p A360497 for d from 2 to 11 do
%p A360497   S:= map(t -> (10*t+2,10*t+3,10*t+5,10*t+7), S);
%p A360497   for x in S do
%p A360497     if member(convert(convert(x,base,10),`+`),R) and isprime(x) then
%p A360497        R:= R union {x}; count:= count+1;
%p A360497     fi
%p A360497   od;
%p A360497 od:
%p A360497 sort(convert(R,list)); # _Robert Israel_, Mar 02 2023
%o A360497 (Python)
%o A360497 from sympy import isprime
%o A360497 seq = [2, 3, 5, 7]
%o A360497 for i in range(9, 10**6, 2):
%o A360497     s = str(i)
%o A360497     if set(s) <= set("2357") and sum(map(int, s)) in seq and isprime(i):
%o A360497         seq.append(i)
%o A360497 print(seq)
%Y A360497 A subsequence of A062088.
%Y A360497 Cf. A000040, A007953.
%K A360497 nonn,base
%O A360497 1,1
%A A360497 _Hongwei Jin_, Feb 09 2023