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.

A353366 Dirichlet inverse of A110963, which is a fractalization of Kimberling's paraphrases sequence (A003602).

This page as a plain text file.
%I A353366 #13 Jan 04 2024 23:55:05
%S A353366 1,-1,-1,0,-2,1,-1,0,-2,2,-2,0,-4,1,3,0,-5,2,-3,0,-4,2,-2,0,-3,4,1,0,
%T A353366 -8,-3,-1,0,-5,5,-1,0,-10,3,5,0,-11,4,-6,0,-4,2,-2,0,-12,3,3,0,-14,-1,
%U A353366 4,0,-9,8,-8,0,-16,1,14,0,-1,5,-9,0,-14,1,-5,0,-19,10,-4,0,-16,-5,-3,0,-12,11,-11,0,-2,6,10
%N A353366 Dirichlet inverse of A110963, which is a fractalization of Kimberling's paraphrases sequence (A003602).
%H A353366 Antti Karttunen, <a href="/A353366/b353366.txt">Table of n, a(n) for n = 1..16384</a>
%F A353366 a(1) = 1; a(n) = -Sum_{d|n, d < n} A110963(n/d) * a(d).
%F A353366 a(n) = A353367(n) - A110963(n).
%o A353366 (PARI)
%o A353366 up_to = 65537;
%o A353366 DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
%o A353366 A003602(n) = (1+(n>>valuation(n,2)))/2;
%o A353366 A110963(n) = if(n%2, A003602((1+n)/2), A110963(n/2));
%o A353366 v353366 = DirInverseCorrect(vector(up_to,n,A110963(n)));
%o A353366 A353366(n) = v353366[n];
%o A353366 (Python)
%o A353366 from functools import lru_cache
%o A353366 from sympy import divisors
%o A353366 @lru_cache(maxsize=None)
%o A353366 def A353366(n): return 1 if n==1 else -sum(((1+(m:=d>>(~d&d-1).bit_length())>>(m+1&-m-1).bit_length())+1)*A353366(n//d) for d in divisors(n,generator=True) if d>1) # _Chai Wah Wu_, Jan 04 2024
%Y A353366 Cf. A003602, A110963, A353367.
%Y A353366 Cf. also A349134, A353368.
%K A353366 sign
%O A353366 1,5
%A A353366 _Antti Karttunen_, Apr 18 2022