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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022908 The sequence M(n) in A022905. 2
0, 2, 5, 11, 20, 35, 56, 86, 125, 179, 248, 338, 449, 590, 761, 971, 1220, 1523, 1880, 2306, 2801, 3386, 4061, 4847, 5744, 6782, 7961, 9311, 10832, 12563, 14504, 16694, 19133, 21875, 24920, 28322, 32081, 36266, 40877, 45983, 51584 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
J. M. Dover, On two OEIS conjectures, arXiv:1606.08033 [math.CO], 2016.
FORMULA
a(n) = n + Sum_{k=1..n-1} A022907(k), n > 1. [corrected by Sean A. Irvine, May 22 2019]
a(1) = 0; a(n) = (1+3*A033485(2*n-3))/2 = A022905(n-1)+1, n > 1. - Philippe Deléham, May 30 2006
MATHEMATICA
(* b = A022905 *) b[1] = 1; b[n_] := b[n] = b[n-1] + 1 + If[EvenQ[n], 2 b[n/2], b[(n-1)/2] + b[(n+1)/2]];
a[1] = 0; a[n_] := b[n-1] + 1;
Array[a, 50] (* Jean-François Alcover, Nov 11 2018 *)
PROG
(Python)
from itertools import islice
from collections import deque
def A022908_gen(): # generator of terms
aqueue, f, b, a = deque([2]), True, 1, 2
yield from (0, 2)
while True:
a += b
aqueue.append(a)
if f:
yield (3*a+1)//2
b = aqueue.popleft()
f = not f
A022908_list = list(islice(A022908_gen(), 40)) # Chai Wah Wu, Jun 08 2022
CROSSREFS
Sequence in context: A139482 A038377 A261227 * A256310 A026390 A005575
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 March 29 06:15 EDT 2024. Contains 371265 sequences. (Running on oeis4.)