OFFSET
0,2
COMMENTS
This sequence is eventually cyclic with period 360.
LINKS
Reinhard Zumkeller and Charles R Greathouse IV, Table of n, a(n) for n = 0..10000 (terms below 97 from Zumkeller)
EXAMPLE
2*prime(7) + prime(23) = 2*17 + 83 = 117 = 3*3*13, so a(4) = gpf(117) = 13.
MATHEMATICA
Transpose[NestList[{#[[2]], FactorInteger[2Prime[ #[[1]]] +Prime[ #[[2]]]][[ -1, 1]]} &, {1, 2}, 900]][[2]]
PROG
(Haskell)
a122631 n = a122631_list !! (n-1)
a122631_list =
1 : 2 : map a006530 (zipWith (+) (map ((2 *) . a000040) a122631_list)
(map a000040 (tail a122631_list)))
-- Reinhard Zumkeller, Aug 07 2011
(PARI) a=[1, 2]; for(n=2, 50, my(f=factor(2*prime(a[n-1])+prime(a[n]))[, 1]); a=concat(a, f[#f])); a \\ Charles R Greathouse IV, Jun 19 2013
CROSSREFS
KEYWORD
nice,nonn,easy
AUTHOR
Carlos Alves, Oct 29 2006
EXTENSIONS
Offset fixed and initial 1 prepended by Reinhard Zumkeller, Aug 07 2011
STATUS
approved