login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039997 Number of distinct primes which occur as substrings of the digits of n. 10
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, 1, 1, 2, 0, 1 (list; graph; refs; listen; history; internal format)
OFFSET

1,13

COMMENTS

a(A062115(n))=0; a(A093301(n))=n and a(m)<>n for m < A093301(n). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 16 2007

a(A163753(n)) > 0; a(A205667(n)) = 1. [Reinhard Zumkeller, Jan 31 2012]

LINKS

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

EXAMPLE

a(22)=1 because 22 has two substrings which are prime but they are identical. a(103)=2, since the primes 3 and 103 occur as substrings.

MATHEMATICA

a[n_] := Block[{s = IntegerDigits[n], c = 0, d = {}}, l = Length[s]; t = Flatten[ Table[ Take[s, {i, j}], {i, 1, l}, {j, i, l}], 1]; k = l(l + 1)/2; While[k > 0, If[ t[[k]][[1]] != 0, d = Append[d, FromDigits[ t[[k]] ]]]; k-- ]; Count[ PrimeQ[ Union[d]], True]]; Table[ a[n], {n, 1, 105}]

PROG

(Haskell)

import Data.List (isInfixOf)

a039997 n = length [p | p <- takeWhile (<= n) a000040_list,

                        show p `isInfixOf` show n]

a039997_list = map a039997 [1..]

-- Reinhard Zumkeller, Jan 31 2012

CROSSREFS

Different from A039995 after the 100th term. Cf. A035232.

Sequence in context: A113686 A192033 A193403 * A039995 A035232 A091603

Adjacent sequences:  A039994 A039995 A039996 * A039998 A039999 A040000

KEYWORD

nonn,base

AUTHOR

Dave Wilson

EXTENSIONS

Edited by Robert G. Wilson v (rgwv(AT)rgwv.com), Feb 24 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 06:37 EST 2012. Contains 205860 sequences.