OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
MATHEMATICA
f[p_, e_] := If[PrimeQ[PrimePi[p]], 1, (p^(e+1)-1)/(p-1)]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; seq = {}; s1 = s[1]; n = 2; c = 0; While[c < 40, s2 = s[n]; If[s1 == s2, c++; AppendTo[seq, n - 1]]; s1 = s2; n++]; seq
PROG
(PARI) s(n) = {my(f = factor(n), p = f[, 1], e = f[, 2]); prod(i = 1, #p, if(isprime(primepi(p[i])), 1, (p[i]^(e[i]+1)-1)/(p[i]-1))); }
lista(nmax) = {my(s1 = s(1), s2); for(n=2, nmax, s2=s(n); if(s1 == s2, print1(n-1, ", ")); s1 = s2); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Feb 04 2023
STATUS
approved