login
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).
2

%I #25 Sep 06 2023 14:58:46

%S 1,10,15,20,25,42,49,50,55,66,75,78,91,100,110,121,125,136,153,156,

%T 164,169,171,182,189,190,205,250,253,272,276,289,294,342,343,354,361,

%U 375,406,413,435,465,473,496,500,506,516,529,555,592,605,625

%N 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).

%C The prime 479 first appears in f(m) at m = 2395, ahead of 71, which first appears in f(2485).

%C The first occurrence of four distinct primes is at m = 2500, with 5^7, 17^3, 71 and 479.

%C For 1890 < m < 2006, d(m) is a square (f(m)=1). The lone prime in 1875 .. 1890 is 61 and in 2006 .. 2027 it is 59.

%C It appears that f(m) can differ from f(m-1) in at most one prime.

%C (f from definition) = A007913, squarefree part. - _Reinhard Zumkeller_, Jul 06 2012

%H Reinhard Zumkeller, <a href="/A035166/b035166.txt">Table of n, a(n) for n = 1..250</a>

%e f(10) = 5 is the first time f(m) > 1. The 5 persists until it disappears at m = 15.

%t 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 *)

%o (Macsyma) for k:1 do (subset(factor_number(denom(harmonic(k,2))), lambda([x],oddp(second(x)))), if old#old:%% then print(k,%%))

%o (Haskell)

%o import Data.List (findIndices)

%o a035166 n = a035166_list !! (n-1)

%o a035166_list = map (+ 1) $ findIndices (/= 0) $ zipWith (-) (tail gs) gs

%o where gs = 0 : map a007913 a007407_list

%o -- _Reinhard Zumkeller_, Jul 06 2012

%o (PARI) d(m) = denominator(sum(k=1, m, 1/k^2));

%o f(m) = my(f=factor(d(m))); for (k=1, #f~, if (!(f[k,2] % 2), f[k,2] = 0)); factorback(f);

%o isok(m) = if (m==1, 1, f(m) != f(m-1)); \\ _Michel Marcus_, Sep 06 2023

%Y Cf. A075326, A075327, A007407.

%K nonn,nice

%O 1,2

%A _Bill Gosper_, Sep 04 2002