login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A075565 Numbers n such that sopf(n) = sopf(n-1) + sopf(n-2), where sopf(x) = sum of the distinct prime factors of x. 15

%I #29 Sep 08 2022 08:45:07

%S 5,23,58,901,1552,1921,4195,6280,10858,19649,20385,32017,63657,65704,

%T 83272,84120,86242,105571,145238,181845,271329,271742,316711,322954,

%U 331977,345186,379660,381431,409916,424504,490256,524477,542566,550272,561661,565217,566560

%N Numbers n such that sopf(n) = sopf(n-1) + sopf(n-2), where sopf(x) = sum of the distinct prime factors of x.

%H Amiram Eldar, <a href="/A075565/b075565.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..371 from G. C. Greubel)

%e 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.

%t p[n_] := Apply[Plus, Transpose[FactorInteger[n]][[1]]]; Select[Range[4, 10^5], p[ # - 1] + p[ # - 2] == p[ # ] &]

%o (PARI) sopf(n) = my(f=factor(n)); sum(k=1, #f~, f[k,1]);

%o isok(n) = sopf(n) == sopf(n-1) + sopf(n-2); \\ _Michel Marcus_, Feb 12 2020

%o (Magma) [k:k in [5..560000]| &+PrimeDivisors(k-1)+ &+PrimeDivisors(k-2) eq &+PrimeDivisors(k)]; // _Marius A. Burtea_, Feb 12 2020

%o (Python)

%o from sympy import primefactors

%o def sopf(n): return sum(primefactors(n))

%o def afind(limit):

%o sopfm2, sopfm1, sopf = 2, 3, 2

%o for k in range(4, limit+1):

%o if sopf == sopfm1 + sopfm2: print(k, end=", ")

%o sopfm2, sopfm1, sopf = sopfm1, sopf, sum(primefactors(k+1))

%o afind(600000) # _Michael S. Branicky_, May 23 2021

%Y Cf. A008472, A075784, A075846, A076525, A076527, A076531, A076532, A076533.

%K nonn

%O 1,1

%A _Joseph L. Pe_, Oct 18 2002

%E Edited and extended by _Ray Chandler_, Feb 13 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)