OFFSET
1,3
LINKS
T. D. Noe, Table of n, a(n) for n=1..2000
EXAMPLE
If we add 10 to each of the first 10 terms of the sequence, we get
[11,11,12,11,13,11,14,11,11,12]. Of these only the six 11's and the 13 are primes. So a(11) = 7.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = (For[k = 1; cnt = 0, k < n, k++, If[PrimeQ[a[k] + n - 1], cnt++]]; cnt); Table[a[n], {n, 1, 84}] (* Jean-François Alcover, Sep 13 2013 *)
PROG
(PARI) {v=[1]; for(n=2, 250, w=vector(length(v)+1); s=0; for(i=1, length(v), w[i]=v[i]; if(isprime(v[i]+n-1), s++)); w[length(v)+1]=s; v=w); v} (Herrgesell)
(Haskell)
a114897 n = a114897_list !! (n-1)
a114897_list = 1 : f 1 [1] where
f x zs = z : f (x + 1) (z : zs) where
z = toInteger $ sum $ map (a010051 . (+ x)) zs
-- Reinhard Zumkeller, Jul 31 2012
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Leroy Quet, Jan 05 2006
EXTENSIONS
More terms from Lambert Herrgesell (zero815(AT)googlemail.com), Jan 16 2006
STATUS
approved