A035166 Let d(m) = denominator of Sum_{k=1..m} 1/k^2 and consider f(m) = product of primes which appear to odd powers in d(m); sequence lists m such that f(m) is different from f(m-1).
1, 10, 15, 20, 25, 42, 49, 50, 55, 66, 75, 78, 91, 100, 110, 121, 125, 136, 153, 156, 164, 169, 171, 182, 189, 190, 205, 250, 253, 272, 276, 289, 294, 342, 343, 354, 361, 375, 406, 413, 435, 465, 473, 496, 500, 506, 516, 529, 555, 592, 605, 625
Offset: 1
Examples
f(10) = 5 is the first time f(m) > 1. The 5 persists until it disappears at m = 15.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..250
Programs
-
Haskell
import Data.List (findIndices) a035166 n = a035166_list !! (n-1) a035166_list = map (+ 1) $ findIndices (/= 0) $ zipWith (-) (tail gs) gs where gs = 0 : map a007913 a007407_list -- Reinhard Zumkeller, Jul 06 2012
-
Macsyma
for k:1 do (subset(factor_number(denom(harmonic(k,2))), lambda([x],oddp(second(x)))), if old#old:%% then print(k,%%))
-
Mathematica
d[n_] := Denominator[ HarmonicNumber[n, 2]]; f[n_] := Times @@ Select[ FactorInteger[d[n]], OddQ[#[[2]]]&][[All, 1]]; A035166 = Join[{1}, Select[ Range[1000], f[#] != f[#-1]&]] (* Jean-François Alcover, Feb 26 2016 *)
-
PARI
d(m) = denominator(sum(k=1, m, 1/k^2)); f(m) = my(f=factor(d(m))); for (k=1, #f~, if (!(f[k,2] % 2), f[k,2] = 0)); factorback(f); isok(m) = if (m==1, 1, f(m) != f(m-1)); \\ Michel Marcus, Sep 06 2023
Comments