A071988 Triple Peano sequence: a list of triples (x,y,z) starting at (1,1,1); then x'=x+1, y'=y+x, z'=z+y, for x only ranging over the primes.
2, 2, 2, 3, 4, 4, 5, 11, 15, 7, 22, 42, 11, 56, 176, 13, 79, 299, 17, 137, 697, 19, 172, 988, 23, 254, 1794, 29, 407, 3683, 31, 466, 4526, 37, 667, 7807, 41, 821, 10701, 43, 904, 12384, 47, 1082, 16262, 53, 1379, 23479, 59, 1712, 32568, 61, 1831, 36051, 67, 2212
Offset: 1
Keywords
Examples
x'=x+1=1+1=2, y'=y+x=1+1=2, z'=z+y=1+1=2.
Programs
-
Mathematica
seq[n_Integer?Positive] := Module[{fn01 = 1, fn10 = 1, fnout = 1}, Do[{fn10, fn01, fnout} = {fn10 + 1, fn01 + fn10, fn01 + fnout}, {n - 1}]; {fn10, fn01, fnout}]; Flatten[ Table[ seq[ Prime[n]], {n, 1, 100}]]
-
PARI
a(n)=subst([x,x*(x-1)/2+1,(x^3-3*x^2+8*x)/6],x, prime(1+(n-1)\3))[1+(n-1)%3]
Extensions
Edited by Robert G. Wilson v, Jul 03 2002
Comments