cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A067868 a(n) = a(n-1) + a(floor(n/2))^2 for n > 0, a(0) = 1.

Original entry on oeis.org

1, 2, 6, 10, 46, 82, 182, 282, 2398, 4514, 11238, 17962, 51086, 84210, 163734, 243258, 5993662, 11744066, 32120262, 52496458, 178789102, 305081746, 627715190, 950348634, 3560128030, 6169907426, 13261231526, 20352555626, 47161378382, 73970201138, 133144655702, 192319110266
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 16 2002

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [n le 2 select Factorial(n+1) else Self(n-1) + (Self(Floor(n/2)))^2: n in [1..51]]; // G. C. Greubel, Feb 10 2021
  • Mathematica
    a[n_]:= a[n] = If[n==0, 1, a[n-1] + (a[Floor[n/2]])^2];
    Table[a[n], {n, 0, 50}] (* G. C. Greubel, Feb 10 2021 *)
  • PARI
    a(n) = if (n==0, 1, a(n-1)+a(n\2)^2);
    
  • Sage
    def a(n): return 1 if n == 0 else a(n-1) + (a(n//2))^2
    [a(n) for n in range(50)] # G. C. Greubel, Feb 10 2021
    

Extensions

Corrected name and more terms from Michel Marcus, Feb 05 2021

A347027 a(1) = 1; a(n) = a(n-1) + 2 * a(floor(n/2)).

Original entry on oeis.org

1, 3, 5, 11, 17, 27, 37, 59, 81, 115, 149, 203, 257, 331, 405, 523, 641, 803, 965, 1195, 1425, 1723, 2021, 2427, 2833, 3347, 3861, 4523, 5185, 5995, 6805, 7851, 8897, 10179, 11461, 13067, 14673, 16603, 18533, 20923, 23313, 26163, 29013, 32459, 35905, 39947, 43989
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 11 2021

Keywords

Crossrefs

Partial sums of A039722.

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + 2 a[Floor[n/2]]; Table[a[n], {n, 1, 47}]
    nmax = 47; A[] = 0; Do[A[x] = (x + 2 (1 + x) A[x^2])/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x] // Rest
  • Python
    from collections import deque
    from itertools import islice
    def A347027_gen(): # generator of terms
        aqueue, f, b, a = deque([3]), True, 1, 3
        yield from (1, 3)
        while True:
            a += 2*b
            yield a
            aqueue.append(a)
            if f: b = aqueue.popleft()
            f = not f
    A347027_list = list(islice(A347027_gen(),40)) # Chai Wah Wu, Jun 08 2022

Formula

G.f. A(x) satisfies: A(x) = (x + 2 * (1 + x) * A(x^2)) / (1 - x).
a(n) = 1 + 2 * Sum_{k=2..n} a(floor(k/2)).
Showing 1-2 of 2 results.