A075565 Numbers n such that sopf(n) = sopf(n-1) + sopf(n-2), where sopf(x) = sum of the distinct prime factors of x.
5, 23, 58, 901, 1552, 1921, 4195, 6280, 10858, 19649, 20385, 32017, 63657, 65704, 83272, 84120, 86242, 105571, 145238, 181845, 271329, 271742, 316711, 322954, 331977, 345186, 379660, 381431, 409916, 424504, 490256, 524477, 542566, 550272, 561661, 565217, 566560
Offset: 1
Keywords
Examples
The sum of the distinct prime factors of 23 is 23; the sum of the distinct prime factors of 22 = 2 * 11 is 2 + 11 = 13; the sum of the distinct prime factors of 21 = 3 * 7 is 3 + 7 = 10; Hence 23 belongs to the sequence.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..371 from G. C. Greubel)
Programs
-
Magma
[k:k in [5..560000]| &+PrimeDivisors(k-1)+ &+PrimeDivisors(k-2) eq &+PrimeDivisors(k)]; // Marius A. Burtea, Feb 12 2020
-
Mathematica
p[n_] := Apply[Plus, Transpose[FactorInteger[n]][[1]]]; Select[Range[4, 10^5], p[ # - 1] + p[ # - 2] == p[ # ] &]
-
PARI
sopf(n) = my(f=factor(n)); sum(k=1, #f~, f[k,1]); isok(n) = sopf(n) == sopf(n-1) + sopf(n-2); \\ Michel Marcus, Feb 12 2020
-
Python
from sympy import primefactors def sopf(n): return sum(primefactors(n)) def afind(limit): sopfm2, sopfm1, sopf = 2, 3, 2 for k in range(4, limit+1): if sopf == sopfm1 + sopfm2: print(k, end=", ") sopfm2, sopfm1, sopf = sopfm1, sopf, sum(primefactors(k+1)) afind(600000) # Michael S. Branicky, May 23 2021
Extensions
Edited and extended by Ray Chandler, Feb 13 2005