login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039995 Number of distinct primes which occur as subsequences of the sequence of digits of n. 6
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 2, 0, 1, 0, 2, 0, 1, 1, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 3, 1, 1, 0, 1, 1, 2, 0, 1, 0, 2, 0, 0, 1, 1, 2, 3, 1, 1, 1, 2, 1, 2, 0, 1, 1, 1, 0, 1, 0, 2, 0, 0, 1, 2, 2, 3, 1, 2, 1, 1, 1, 2, 0, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 2, 0, 0, 0, 2, 1, 3, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,13

COMMENTS

a(n) counts subsequences of digits of n which denote primes.

a(A094535(n)) = n and a(m) < n for m < A094535(n); A039995(39467139)=100, cf. A205956. [Reinhard Zumkeller, Feb 01 2012]

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

a(103)=3; the 3 primes are 3, 13 and 103.

MATHEMATICA

cnt[n_] := Module[{d = IntegerDigits[n]}, Length[Union[Select[FromDigits /@ Subsets[d], PrimeQ]]]]; Table[cnt[n], {n, 105}] (* T. D. Noe, Jan 31 2012 *)

PROG

(Haskell)

import Data.List (subsequences, nub)

a039995 n = sum $

   map a010051 $ nub $ map read (tail $ subsequences $ show n)

-- Reinhard Zumkeller, Jan 31 2012

CROSSREFS

A039997 counts only the primes which occur as substrings, i.e. contiguous subsequences. Cf. A035232.

Cf. A010051.

Sequence in context: A113686 A193403 A039997 * A035232 A091603 A325036

Adjacent sequences:  A039992 A039993 A039994 * A039996 A039997 A039998

KEYWORD

nonn,base

AUTHOR

David W. Wilson

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 25 10:38 EDT 2020. Contains 337337 sequences. (Running on oeis4.)