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!)
A289838 a(n) = A289815(n) * A289816(n). 3

%I #27 Apr 22 2021 09:30:44

%S 1,2,2,3,6,6,3,6,6,4,10,10,12,30,30,12,30,30,4,10,10,12,30,30,12,30,

%T 30,5,14,14,15,42,42,15,42,42,20,70,70,60,210,210,60,210,210,20,70,70,

%U 60,210,210,60,210,210,5,14,14,15,42,42,15,42,42,20,70,70

%N a(n) = A289815(n) * A289816(n).

%C Each number k > 0 appears 2^omega(k) times (where omega = A001221).

%C a(A004488(n)) = a(n) for any n >= 0.

%C The number of distinct prime factors of a(n) equals the number of nonzero digits in the ternary representation of n.

%H Rémy Sigrist, <a href="/A289838/b289838.txt">Table of n, a(n) for n = 0..10000</a>

%e a(42) = A289815(42) * A289816(42) = 20 * 3 = 60.

%o (PARI) a(n) = { my (v=1);

%o for (o=2, oo,

%o if (n==0, return (v));

%o if (gcd(v, o)==1 && omega(o)==1,

%o if (n % 3, v *= o);

%o n \= 3;

%o );

%o );}

%o (Python)

%o from sympy import gcd, primefactors

%o def omega(n): return 0 if n==1 else len(primefactors(n))

%o def a(n):

%o v, o = 1, 2

%o while True:

%o if n==0: return v

%o if gcd(v, o)==1 and omega(o)==1:

%o if n%3: v*=o

%o n //= 3

%o o+=1

%o print([a(n) for n in range(101)]) # _Indranil Ghosh_, Aug 02 2017

%Y Cf. A001221, A004488, A289815, A289816.

%K nonn,base,look

%O 0,2

%A _Rémy Sigrist_, Jul 13 2017

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 April 25 14:08 EDT 2024. Contains 371989 sequences. (Running on oeis4.)