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!)
A358369 Euler transform of 2^floor(n/2), (A016116). 6

%I #10 Nov 18 2022 18:17:26

%S 1,1,3,5,12,20,43,73,146,250,475,813,1499,2555,4592,7800,13761,23253,

%T 40421,67963,116723,195291,332026,552882,932023,1544943,2585243,

%U 4267081,7094593,11662769,19281018,31575874,51937608,84753396,138772038,225693778,368017636

%N Euler transform of 2^floor(n/2), (A016116).

%p BinaryRecurrenceSequence := proc(b, c, u0:=0, u1:=1) local u;

%p u := proc(n) option remember; if n < 2 then return [u0, u1][n + 1] fi;

%p b*u(n - 1) + c*u(n - 2) end; u end:

%p EulerTransform := proc(a) local b;

%p b := proc(n) option remember; if n = 0 then return 1 fi; add(add(d * a(d),

%p d = NumberTheory:-Divisors(j)) * b(n-j), j = 1..n) / n end; b end:

%p a := EulerTransform(BinaryRecurrenceSequence(0, 2, 1)): seq(a(n), n=0..36);

%o (Sage) # uses[EulerTransform from A166861]

%o b = BinaryRecurrenceSequence(0, 2, 1)

%o a = EulerTransform(b)

%o print([a(n) for n in range(37)])

%o (Python)

%o from typing import Callable

%o from functools import cache

%o from sympy import divisors

%o def BinaryRecurrenceSequence(b:int, c:int, u0:int=0, u1:int=1) -> Callable:

%o @cache

%o def u(n: int) -> int:

%o if n < 2:

%o return [u0, u1][n]

%o return b * u(n - 1) + c * u(n - 2)

%o return u

%o def EulerTransform(a: Callable) -> Callable:

%o @cache

%o def b(n: int) -> int:

%o if n == 0:

%o return 1

%o s = sum(sum(d * a(d) for d in divisors(j)) * b(n - j)

%o for j in range(1, n + 1))

%o return s // n

%o return b

%o b = BinaryRecurrenceSequence(0, 2, 1)

%o a = EulerTransform(b)

%o print([a(n) for n in range(37)])

%Y Cf. A002513, A016116.

%Y Sequences that can be represented as a EulerTransform(BinaryRecurrenceSequence()) include A000009, A000041, A000712, A001970, A002513, A010054, A015128, A022567, A034691, A111317, A111335, A117410, A156224, A166861, A200544, A261031, A261329, A358449.

%K nonn

%O 0,3

%A _Peter Luschny_, Nov 17 2022

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 28 16:28 EDT 2024. Contains 371254 sequences. (Running on oeis4.)