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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079066 "Memory" of prime(n): the number of (previous) primes contained as substrings in prime(n). 17
0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 1, 2, 0, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0, 1, 1, 0, 3, 2, 3, 4, 2, 0, 1, 2, 1, 2, 4, 3, 0, 1, 2, 3, 1, 2, 3, 2, 2, 3, 3, 2, 2, 3, 2, 1, 3, 2, 1, 3, 3, 2, 3, 3, 4, 2, 3, 3, 1, 3, 3, 3, 4, 4, 2, 2, 3, 0, 0, 2, 1, 3, 2, 2, 2, 0, 2, 1, 1, 2, 3, 1, 0, 0, 2, 1, 2, 4, 2, 3, 2, 2, 1, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,9

LINKS

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

FORMULA

A039997(prime(n)) - 1.

EXAMPLE

The primes contained as substrings in prime(3) = 113 are 3, 11, 13. Hence a(30) = 3. 113 is the smallest prime with memory = 3.

MATHEMATICA

ub = 105; tprime = Table[ToString[Prime[i]], {i, 1, ub}]; a = {}; For[i = 1, i <= ub, i++, m = 0; For[j = 1, j < i, j++, If[Length[StringPosition[tprime[[i]], tprime[[j]]]] > 0, m = m + 1]]; a = Append[a, m]]; a

PROG

(Haskell)

import Data.List (isInfixOf)

a079066 n =

   length $ filter (`isInfixOf` (primesDec !! n)) $ take n primesDec

primesDec = "_" : map show a000040_list

-- Reinhard Zumkeller, Jul 19 2011

CROSSREFS

Cf. A079075, A035232.

Cf. A033274, A179909, A179910, A179911, A179912, A179913, A179914, A179915, A179916, A179917, A179918, A179919, A179922.

Sequence in context: A025925 A240857 A109066 * A157188 A173266 A224326

Adjacent sequences:  A079063 A079064 A079065 * A079067 A079068 A079069

KEYWORD

base,easy,nonn

AUTHOR

Joseph L. Pe, Feb 02 2003

EXTENSIONS

Edited by Robert G. Wilson v, Feb 25 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 April 19 10:45 EDT 2019. Contains 322255 sequences. (Running on oeis4.)