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.

A092620 Numbers with exactly one prime digit.

This page as a plain text file.
%I A092620 #15 Apr 23 2022 21:33:50
%S A092620 2,3,5,7,12,13,15,17,20,21,24,26,28,29,30,31,34,36,38,39,42,43,45,47,
%T A092620 50,51,54,56,58,59,62,63,65,67,70,71,74,76,78,79,82,83,85,87,92,93,95,
%U A092620 97,102,103,105,107,112,113,115,117,120,121,124,126,128,129,130,131,134
%N A092620 Numbers with exactly one prime digit.
%C A092620 A193238(a(n))=1; subsequence of A118950. - _Reinhard Zumkeller_, Jul 19 2011
%H A092620 Reinhard Zumkeller, <a href="/A092620/b092620.txt">Table of n, a(n) for n = 1..10000</a>
%F A092620 There are 6^n*(n-1/6)*2/3 n-digit members of this sequence for n > 1. - _Charles R Greathouse IV_, Apr 23 2022
%e A092620 12 has one prime digit, 2;
%e A092620 102 has one prime digit, 2.
%p A092620 stev_sez:=proc(n) local i, tren, st, ans, anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i,ans) ]; od; RETURN(anstren); end: ts_stpf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i,ans))='true') then stpf:=stpf+1; # number of prime digits fi od; RETURN(stpf) end: ts_pr_n:=proc(n) local i, stpf, ans, ans1, tren; ans:=[ ]: stpf:=0: tren:=1: for i from 1 to n do if ( isprime(i)='true' and ts_stpf(i) =0) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_n(300);
%t A092620 Select[Range[150],Count[IntegerDigits[#],_?(PrimeQ)]==1&] (* _Harvey P. Dale_, Mar 23 2018 *)
%o A092620 (Haskell)
%o A092620 import Data.List (elemIndices)
%o A092620 a092620 n = a092620_list !! (n-1)
%o A092620 a092620_list = elemIndices 1 a193238_list
%o A092620 -- _Reinhard Zumkeller_, Jul 19 2011
%Y A092620 Subsequence of A118950.
%Y A092620 Cf. A046034, A084984, A092624, A092625.
%K A092620 nonn,base,easy
%O A092620 1,1
%A A092620 _Jani Melik_, Apr 11 2004