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!)
A035232 Number of substrings of n which are primes. 59
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 2, 0, 1, 0, 2, 0, 1, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 3, 1, 1, 0, 1, 1, 2, 0, 1, 0, 2, 0, 0, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 0, 1, 1, 1, 0, 1, 0, 2, 0, 0, 1, 2, 2, 3, 1, 2, 1, 2, 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; text; internal format)
OFFSET

1,13

COMMENTS

No leading 0's allowed in substrings.

LINKS

Table of n, a(n) for n=1..105.

EXAMPLE

The primes occurring as substrings of 37 are 3, 7, 37, so a(37)=3. a(22)=2, since the prime 2 occurs twice as a substring.

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[d], True]]; Table[ a[n], {n, 1, 105}]

CROSSREFS

Cf. A039997, A039995.

Sequence in context: A193403 A039997 A039995 * A091603 A325036 A194942

Adjacent sequences:  A035229 A035230 A035231 * A035233 A035234 A035235

KEYWORD

base,easy,nonn

AUTHOR

Erich Friedman

EXTENSIONS

Edited by Robert G. Wilson v, Feb 24 2003

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 July 14 15:44 EDT 2020. Contains 335729 sequences. (Running on oeis4.)