login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A271063
a(1) = 2, a(2) = 3; thereafter a(n) = a(n-1) + a(|n-a(T)|), where a(T) is the largest term in the sequence before a(n) such that 0 < |n-a(T)| < n.
2
2, 3, 5, 7, 10, 17, 22, 25, 50, 72, 89, 161, 322, 411, 483, 533, 558, 580, 597, 607, 614, 619, 622, 624, 629, 1253, 1875, 2494, 3108, 3715, 4312, 4892, 5450, 5983, 6466, 6877, 13343, 19326, 24776, 29668, 33980, 37695, 40803, 43297, 86594, 127397, 165092, 199072, 228740, 253516
OFFSET
1,1
COMMENTS
When a(1) = 1, the formula generates the natural numbers.
LINKS
EXAMPLE
a(11) = 89
a(T) = a(7) = 22
|12-22| = 10
a(10) = 72
89 + 72 = 161
a(12) = 161
MATHEMATICA
a = {2, 3}; Do[AppendTo[a, a[[n - 1]] + Part[a, #] &@ SelectFirst[ Reverse@ Abs[a - n], 0 < # < n &]], {n, 3, 50}]; a (* Michael De Vlieger, Apr 08 2016 *)
PROG
(PARI) lista(nn) = {va = vector(nn); print1(va[1] = 2, ", "); print1(va[2] = 3, ", "); for (n=3, nn, T = 0; forstep(k = n-1, 1, -1, vabs = abs(n - va[k]); if ((vabs < n) && (vabs > 0), T = k; break); ); va[n] = va[n-1] + va[abs(n-va[T])]; print1(va[n], ", "); ); } \\ Michel Marcus, Apr 08 2016
CROSSREFS
Sequence in context: A278706 A005468 A360464 * A182521 A283809 A104622
KEYWORD
nonn
AUTHOR
Cody M. Haderlie, Apr 05 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 17:32 EDT 2024. Contains 376087 sequences. (Running on oeis4.)