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 A094535 #24 Aug 08 2022 08:29:30 %S A094535 1,2,13,23,113,131,137,1013,1031,1273,1237,1379,6173,10139,10193, %T A094535 10379,10397,10937,12397,12379,36137,36173,101397,102371,101937, %U A094535 102973,103917,106937,109371,109739,123797,123917,123719,346137,193719,346173 %N A094535 a(n) is the smallest integer m such that A039995(m)=n. %H A094535 Giovanni Resta, <a href="/A094535/b094535.txt">Table of n, a(n) for n = 0..500</a> (first 101 terms from Reinhard Zumkeller) %H A094535 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_265.htm">Puzzle 265. Primes embedded</a>, The Prime Puzzles & Problems Connection. %H A094535 Reinhard Zumkeller, <a href="/A094535/a094535.txt">Illustration of initial terms</a> %F A094535 A039995(a(n)) = n and A039995(m) != n for m < a(n). - _Reinhard Zumkeller_, Feb 01 2012 %e A094535 a(6) = 137 because 137 is the smallest number m such that A039995(m) = 6; the six numbers 3, 7, 13, 17, 37 & 137 are primes. %e A094535 See also A205956 for a(100) = 39467139. %t A094535 cnt[n_] := Count[ PrimeQ@ Union[ FromDigits /@ Subsets[ IntegerDigits[n]]], True]; a[n_] := Block[{k = 1}, While[cnt[k] != n, k++]; k]; Array[a, 21, 0] (* _Giovanni Resta_, Jun 16 2017 *) %o A094535 (Haskell) %o A094535 import Data.List (elemIndex) %o A094535 import Data.Maybe (fromJust) %o A094535 a094535 n = a094535_list !! n %o A094535 a094535_list = map ((+ 1) . fromJust . (`elemIndex` a039995_list)) [0..] %o A094535 -- _Reinhard Zumkeller_, Feb 01 2012 %o A094535 (Python) %o A094535 from sympy import isprime %o A094535 from itertools import chain, combinations as combs, count, islice %o A094535 def powerset(s): # nonempty subsets of s %o A094535 return chain.from_iterable(combs(s, r) for r in range(1, len(s)+1)) %o A094535 def A039995(n): %o A094535 ss = set(int("".join(s)) for s in powerset(str(n))) %o A094535 return sum(1 for k in ss if isprime(k)) %o A094535 def agen(): %o A094535 adict, n = dict(), 0 %o A094535 for k in count(1): %o A094535 v = A039995(k) %o A094535 if v not in adict: adict[v] = k %o A094535 while n in adict: yield adict[n]; n += 1 %o A094535 print(list(islice(agen(), 36))) # _Michael S. Branicky_, Aug 07 2022 %Y A094535 Cf. A039995, A093301, A039997. %Y A094535 Cf. A205956. %K A094535 base,nonn %O A094535 0,2 %A A094535 _Farideh Firoozbakht_, May 08 2004