[go: up one dir, main page]

login
A318307
Multiplicative with a(p^e) = 2^A002487(e).
6
1, 2, 2, 2, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 4, 2, 2, 4, 2, 4, 4, 4, 2, 8, 2, 4, 4, 4, 2, 8, 2, 8, 4, 4, 4, 4, 2, 4, 4, 8, 2, 8, 2, 4, 4, 4, 2, 4, 2, 4, 4, 4, 2, 8, 4, 8, 4, 4, 2, 8, 2, 4, 4, 4, 4, 8, 2, 4, 4, 8, 2, 8, 2, 4, 4, 4, 4, 8, 2, 4, 2, 4, 2, 8, 4, 4, 4, 8, 2, 8, 4, 4, 4, 4, 4, 16, 2, 4, 4, 4, 2, 8, 2, 8, 8
OFFSET
1,2
FORMULA
a(n) = 2^A318306(n).
a(n) = A061142(A318470(n)).
a(n^2) = a(n).
a(A003557(n^2)) = A318316(n).
Dirichlet convolution square of A318667(n)/A317934(n).
MATHEMATICA
f[m_] := Module[{a = 1, b = 0, n = m}, While[n > 0, If[OddQ[n], b += a, a += b]; n = Floor[n/2]]; b]; Array[Times @@ Map[2^f@ # &, FactorInteger[#][[All, -1]] ] - Boole[# == 1] &, 105] (* after Jean-François Alcover at A002487 *)
PROG
(PARI)
A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
A318307(n) = factorback(apply(e -> 2^A002487(e), factor(n)[, 2]));
(Python)
from functools import reduce
from sympy import factorint
def A318307(n): return 1<<sum(sum(reduce(lambda x, y:(x[0], x[0]+x[1]) if int(y) else (x[0]+x[1], x[1]), bin(e)[-1:2:-1], (1, 0))) for e in factorint(n).values()) # Chai Wah Wu, May 18 2023
CROSSREFS
Differs from A037445 for the first time at n=32, where a(32) = 8, while A037445(32) = 4.
Sequence in context: A281854 A335385 A037445 * A376887 A372381 A331109
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Aug 29 2018
STATUS
approved