OFFSET
1,5
LINKS
Eric Weisstein's World of Math, Root-Mean-Square
EXAMPLE
a(5) = 3: 5 = RMS(5) = RMS(1,7) = RMS(1,5,7);
a(7) = 3: 7 = RMS(7) = RMS(1,5,11) = RMS(1,5,7,11);
a(9) = 9: 9 = RMS(9) = RMS(5,7,13) = RMS(5,7,9,13) = RMS(3,5,11,13) = RMS(3,5,9,11,13) = RMS(1,3,7,11,15) = RMS(1,3,7,9,11,15) = RMS(1,3,5,17) = RMS(1,3,5,9,17);
a(10) = 1: 10 = RMS(1,3,5,7,9,11,15,17);
a(11) = 19: 11 = RMS(11) = RMS(3,9,13,15) = RMS(3,9,11,13,15) = RMS(5,7,17) = RMS(5,7,11,17) = RMS(1,5,13,17) = RMS(1,5,11,13,17) = RMS(1,3,9,15,17) = RMS(1,3,9,11,15,17) = RMS(3,5,7,9,13,15,17) = RMS(3,5,7,9,11,13,15,17) = RMS(1,5,7,13,19) = RMS(1,5,7,11,13,19) = RMS(1,3,7,9,15,19) = RMS(1,3,7,9,11,15,19) = RMS(3,5,7,9,21) = RMS(3,5,7,9,11,21) = RMS(1,3,5,9,13,21) = RMS(1,3,5,9,11,13,21);
a(12) = 2: 12 = RMS(1,5,7,9,11,15,17,19) = RMS(1,3,5,7,9,13,17,23).
PROG
(Haskell)
a211868 n = f a005408_list 1 nn 0 where
f (o:os) l nl xx
| yy > nl = 0
| yy < nl = f os (l + 1) (nl + nn) yy + f os l nl xx
| otherwise = if w == n then 1 else 0
where w = if r == 0 then a000196 m else 0
(m, r) = divMod yy l
yy = xx + o * o
nn = n ^ 2
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Feb 13 2013
EXTENSIONS
a(37)-a(40) from Alois P. Heinz, Feb 25 2013
a(41)-a(42) from Alois P. Heinz, May 03 2015
STATUS
approved