Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A035232
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A035232 Number of substrings of n which are primes. +0
6
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; listen)
OFFSET

1,13

COMMENT

No leading 0's allowed in substrings.

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.

Adjacent sequences: A035229 A035230 A035231 this_sequence A035233 A035234 A035235

Sequence in context: A113686 A039997 A039995 this_sequence A091603 A129688 A086713

KEYWORD

base,easy,nonn

AUTHOR

Erich Friedman (erich.friedman(AT)stetson.edu)

EXTENSIONS

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified May 16 23:01 EDT 2008. Contains 139884 sequences.


AT&T Labs Research