login
a(n) = A278222(n^2).
4

%I #9 May 09 2017 17:37:22

%S 1,2,2,6,2,12,6,12,2,30,12,48,6,210,12,24,2,30,30,420,12,360,48,30,6,

%T 120,210,1260,12,420,24,48,2,30,30,420,30,4620,420,480,12,420,360,

%U 1080,48,960,30,210,6,420,120,2310,210,3360,1260,1680,12,1260,420,6300,24,840,48,96,2,30,30,420,30,4620,420,2520,30,4620,4620,6720,420,9240,480,180

%N a(n) = A278222(n^2).

%H Antti Karttunen, <a href="/A286374/b286374.txt">Table of n, a(n) for n = 0..16384</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(n) = A278222(A000290(n)) = A278222(n^2).

%o (Scheme) (define (A286374 n) (A278222 (* n n)))

%o (Python)

%o from sympy import prime, factorint

%o import math

%o def A(n): return n - 2**int(math.floor(math.log(n, 2)))

%o def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))

%o def a005940(n): return b(n - 1)

%o def P(n):

%o f = factorint(n)

%o return sorted([f[i] for i in f])

%o def a046523(n):

%o x=1

%o while True:

%o if P(n) == P(x): return x

%o else: x+=1

%o def a278222(n): return a046523(a005940(n + 1))

%o def a(n): return a278222(n**2) # _Indranil Ghosh_, May 09 2017

%Y Cf. A000290, A278222, A286243, A286375, A286376, A286377.

%Y Cf. A159918 (one of the matched sequences).

%K nonn,base

%O 0,2

%A _Antti Karttunen_, May 09 2017