cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A357478 Numbers n such that both n and n+1 are in A175729.

This page as a plain text file.
%I A357478 #14 Oct 02 2022 10:33:17
%S A357478 7105,37583,229177,309281,343865,480654,794625,808860,977185,2135895,
%T A357478 2174080,2755841,5978490,6865055,7147761,8784216,11207889,15251713,
%U A357478 15854166,21526897,28432040,29831601,32865300,33531212,40931731,53237184,57766731,63564985,67849950,70751360,72352760,85121596
%N A357478 Numbers n such that both n and n+1 are in A175729.
%C A357478 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.
%H A357478 Robert Israel, <a href="/A357478/b357478.txt">Table of n, a(n) for n = 1..75</a>
%e A357478 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.
%p A357478 R:= NULL: count:= 0: state:= 0:
%p A357478 for n from 2 while count < 30 do
%p A357478   s:= add(t[1]*t[2],t=ifactors(n)[2]);
%p A357478   if n mod s = 1 then
%p A357478      if state = 1 then R:= R, n-1; count:= count+1 fi;
%p A357478      state:= 1;
%p A357478   else
%p A357478      state:= 0;
%p A357478   fi
%p A357478 od:
%p A357478 R;
%t A357478 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 *)
%o A357478 (Python)
%o A357478 from sympy import factorint
%o A357478 from itertools import count, islice
%o A357478 def ok(n):
%o A357478     return n > 1 and (n-1)%sum(p*e for p, e in factorint(n).items()) == 0
%o A357478 def agen():
%o A357478     prevok = kok = False
%o A357478     for k in count(1):
%o A357478         prevok, kok = kok, ok(k)
%o A357478         if prevok and kok: yield k-1
%o A357478 print(list(islice(agen(), 6))) # _Michael S. Branicky_, Sep 30 2022
%Y A357478 Cf. A175729.
%K A357478 nonn
%O A357478 1,1
%A A357478 _J. M. Bergot_ and _Robert Israel_, Sep 30 2022