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!)
A339666 Number of nonempty subsets of divisors of n whose root-mean-square is an integer. 4
1, 2, 2, 3, 2, 4, 3, 4, 3, 4, 2, 6, 2, 6, 4, 5, 2, 6, 2, 6, 6, 4, 2, 8, 3, 4, 4, 9, 2, 8, 2, 6, 4, 4, 7, 9, 2, 4, 4, 12, 3, 12, 2, 6, 7, 4, 2, 12, 5, 6, 4, 6, 2, 8, 5, 12, 4, 4, 2, 26, 2, 4, 9, 7, 4, 8, 2, 6, 4, 14, 2, 12, 2, 4, 6, 6, 6, 8, 2, 24, 5, 6, 2, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Root-Mean-Square
EXAMPLE
a(14) = 6 subsets: {1}, {2}, {7}, {14}, {1, 7} and {2, 14}.
MAPLE
a:= proc(n) option remember; uses numtheory; local l, b;
l, b:= sort([divisors(n)[]]),
proc(i, s, c) option remember;
`if`(i=0, `if`(c>0 and issqr(s/c), 1, 0),
b(i-1, s, c)+b(i-1, s+l[i]^2, c+1))
end; forget(b); b(nops(l), 0$2)
end:
seq(a(n), n=1..100); # Alois P. Heinz, Sep 30 2022
MATHEMATICA
a[n_] := a[n] = Module[{b, l = Divisors[n]}, b[i_, s_, c_] := b[i, s, c] = If[i == 0, If[c > 0 && IntegerQ @ Sqrt[s/c], 1, 0], b[i-1, s, c]+b[i-1, s+l[[i]]^2, c+1]]; b[Length[l], 0, 0]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 13 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A359360 A323164 A363685 * A318881 A280338 A339147
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 11 2020
STATUS
approved

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 23 09:22 EDT 2024. Contains 371905 sequences. (Running on oeis4.)