The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A346422 a(n) = (1 + A014081(n))*a(A053645(n)) for n > 0 with a(0) = 1. 3

%I #55 Apr 21 2024 22:12:37

%S 1,1,1,2,1,1,2,6,1,1,1,4,2,2,6,24,1,1,1,4,1,1,4,18,2,2,2,12,6,6,24,

%T 120,1,1,1,4,1,1,4,18,1,1,1,8,4,4,18,96,2,2,2,12,2,2,12,72,6,6,6,48,

%U 24,24,120,720,1,1,1,4,1,1,4,18,1,1,1,8,4,4,18,96

%N a(n) = (1 + A014081(n))*a(A053645(n)) for n > 0 with a(0) = 1.

%H Michael De Vlieger, <a href="/A346422/b346422.txt">Table of n, a(n) for n = 0..10000</a>

%H Michael De Vlieger, <a href="/A346422/a346422.png">Log-log scatterplot of a(n)</a>, n = 1..2^16.

%F a(n) = (1 + A014081(n))*a(A053645(n)) for n > 0 with a(0) = 1.

%F a(4n+1) = a(2n) = a(n) for n > 0 with a(0) = a(1) = 1.

%F a(4n+3) = 2!*b(n), a(8n+11) = 2*2!*b'(n), b'(2n) = b(n), b'(2n+1) = b'(n),

%F a(8n+7) = 3!*c(n), a(16n+23) = 3*3!*c'(n), c'(2n) = c(n), c'(2n+1) = c'(n),

%F a(16n+15) = 4!*d(n), a(32n+47) = 4*4!*d'(n), d'(2n) = d(n), d'(2n+1) = d'(n),

%F a(32n+31) = 5!*e(n), a(64n+95) = 5*5!*e'(n), e'(2n) = e(n), e'(2n+1) = e'(n),

%F and so on, i.e.,

%F a(2^m*(n+1) - 1) = m!*z(n), a(2^m*(2n+3) - 1) = m*m!*z'(n), z'(2n) = z(n), z'(2n+1) = z'(n).

%F From that, we get:

%F a(2^3*(2n+1) + 3) = 2*a(4n+3), a(2^3*(2n+1) + 11) = a(8n+11),

%F a(2^4*(2n+1) + 7) = 3*a(8n+7), a(2^4*(2n+1) + 23) = a(16n+23),

%F a(2^5*(2n+1) + 15) = 4*a(16n+15), a(2^5*(2n+1) + 47) = a(32n+47),

%F a(2^6*(2n+1) + 31) = 5*a(32n+31), a(2^6*(2n+1) + 95) = a(64n+95),

%F and so on, i.e.,

%F a(2^m*(4n+3) - 1) = m*a(2^m*(n+1) - 1), a(2^m*(4n+5) - 1) = a(2^m*(2n+3) - 1).

%F Let

%F p(n) = 0 if A036987(n) = 1 otherwise p(2n+1) = 2 + p(n), p(2n) = 2 - (n mod 2) for n > 0 with p(0) = p(1) = 0,

%F q(2n+1) = 2^(n+2) - 1, q(2n) = 2^(n+2) + q(2n-1) for n > 0 with q(1) = 3,

%F p_1(n) = 0 if A036987(n) = 1 otherwise q(p(n)) for n > 0 with p_1(0) = 0,

%F p_2(n) = 0 if A036987(n) = 1 otherwise p_2(2n+1) = p_2(n), p_2(2n) = floor((n - 1)/2) for n > 0 with p_2(0) = p_2(1) = 0,

%F so

%F a(4n+3) = (log_2(4n+4))! if A036987(4n+3) = 1 otherwise (1 + (p(n) mod 2)*(p(n) + 1)/2)*a(p_2(n)*2^(floor(p(n)/2) + 2) + p_1(n)) for n >= 0.

%F a((4^n - 1)/3) = 1 for n >= 0.

%F a(2^m*(2^n - 1)) = n! for n > 0, m >= 0.

%t Nest[Append[#1, (1 + Count[Partition[IntegerDigits[#2, 2], 2, 1], {1, 1}]) #1[[#2 - 2^Floor@ Log2[#2] + 1]]] & @@ {#, Length[#]} &, {1}, 79] (* _Michael De Vlieger_, Feb 04 2022 *)

%o (PARI)

%o a(n)=if(n==0, 1, (1+b(n))*a(c(n)))

%o b(n)=if(n==1, 0, if(n%4<2, b(n\4), b(n\2) + n%2)) \\ A014081

%o c(n)=if(n==1, 0, 2*c(n\2) + n%2) \\ A053645

%o (PARI) a(n) = my(f=1,ret=1); if(n, for(i=0,logint(n,2), if(bittest(n,i), ret*=(f+=bittest(n,i-1))))); ret; \\ _Kevin Ryde_, Aug 25 2021

%o (Python)

%o from functools import lru_cache

%o from re import split

%o @lru_cache(maxsize=None)

%o def A346422(n): return 1 if n <= 1 else A346422(int((s:= bin(n)[2:])[1:],2))*(1+sum(len(d)-1 for d in split('0+', s) if d != '')) # _Chai Wah Wu_, Feb 04 2022

%Y Cf. A003714 (positions of 1's), A014081, A036987, A053645.

%K nonn,base

%O 0,4

%A _Mikhail Kurkov_, Aug 08 2021 [verification needed]

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 May 17 05:16 EDT 2024. Contains 372579 sequences. (Running on oeis4.)