login
A357478
Numbers n such that both n and n+1 are in A175729.
1
7105, 37583, 229177, 309281, 343865, 480654, 794625, 808860, 977185, 2135895, 2174080, 2755841, 5978490, 6865055, 7147761, 8784216, 11207889, 15251713, 15854166, 21526897, 28432040, 29831601, 32865300, 33531212, 40931731, 53237184, 57766731, 63564985, 67849950, 70751360, 72352760, 85121596
OFFSET
1,1
COMMENTS
Numbers n such that the sum of the prime factors with multiplicity of n divides n-1 and the sum of the prime factors with multiplicity of n+1 divides n.
LINKS
EXAMPLE
a(3) = 229177 is a term because 229177 = 13*17^2*61, 13+17+17+61 = 108 divides 229177-1 = 229176, 229177+1 = 229178 = 2*19*37*163, and 2+19+37+163 = 221 divides 229177.
MAPLE
R:= NULL: count:= 0: state:= 0:
for n from 2 while count < 30 do
s:= add(t[1]*t[2], t=ifactors(n)[2]);
if n mod s = 1 then
if state = 1 then R:= R, n-1; count:= count+1 fi;
state:= 1;
else
state:= 0;
fi
od:
R;
MATHEMATICA
q[n_] := Divisible[n - 1, Plus @@ Times @@@ FactorInteger[n]]; s = {}; q1 = q[2]; Do[q2 = q[n]; If[q1 && q2, AppendTo[s, n - 1]]; q1 = q2, {n, 3, 10^6}]; s (* Amiram Eldar, Sep 30 2022 *)
PROG
(Python)
from sympy import factorint
from itertools import count, islice
def ok(n):
return n > 1 and (n-1)%sum(p*e for p, e in factorint(n).items()) == 0
def agen():
prevok = kok = False
for k in count(1):
prevok, kok = kok, ok(k)
if prevok and kok: yield k-1
print(list(islice(agen(), 6))) # Michael S. Branicky, Sep 30 2022
CROSSREFS
Cf. A175729.
Sequence in context: A235194 A034230 A183630 * A189354 A252383 A252350
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Sep 30 2022
STATUS
approved