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.

A359847 Oblong numbers k for which phi(k) is also an oblong number.

This page as a plain text file.
%I A359847 #33 Feb 17 2023 02:06:08
%S A359847 6,42,182,650,930,4830,7482,9506,12882,13572,16770,79242,167690,
%T A359847 181902,228006,289982,380072,3480090,5209806,6872262,10102862,
%U A359847 16068072,56002772,56648202,59174556,70299840,74831150,123287712,261517412,342601590,356322252,455459622,536223492,1057452842
%N A359847 Oblong numbers k for which phi(k) is also an oblong number.
%C A359847 Since k and k+1 are relatively prime, the calculation of phi(k)*phi(k+1) is faster than that of phi(k*(k+1)). - _Robert G. Wilson v_, Feb 14 2023
%H A359847 Robert G. Wilson v, <a href="/A359847/b359847.txt">Table of n, a(n) for n = 1..269</a>
%H A359847 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TotientFunction.html">Totient Function</a>.
%e A359847 9506 is a term because 9506 = 97*98 and phi(9506) = 4032 = 63*64.
%p A359847 lastv:= 1: R:= NULL: count:= 0:
%p A359847 for n from 3 while count < 50 do
%p A359847   v:= numtheory:-phi(n);
%p A359847   if issqr(4*v*lastv+1) then
%p A359847     R:= R, n*(n-1); count:= count+1;
%p A359847     fi;
%p A359847   lastv:= v;
%p A359847 od:
%p A359847 R; # _Robert Israel_, Feb 15 2023
%t A359847 Select[Table[n*(n + 1), {n, 1, 100000}], IntegerQ @ Sqrt[4*EulerPhi[#] + 1] &] (* _Amiram Eldar_, Jan 15 2023 *)
%t A359847 k = pk0 = pk1 = 1; lst = {}; While[k < 10000, If[ IntegerQ@ Sqrt[4*pk0*pk1 + 1], AppendTo[lst, k (k + 1)]]; k++; pk0 = pk1; pk1 = EulerPhi[k + 1]]; lst (* _Robert G. Wilson v_, Feb 14 2023 *)
%o A359847 (PARI) for(k=1, 10^5, my(n=k*(k+1), p=eulerphi(n)); if(issquare(4*p+1), print1(n,", ")))
%Y A359847 Cf. A000010, A002378, A287472.
%Y A359847 Intersection of A002378 and A236386.
%K A359847 nonn
%O A359847 1,1
%A A359847 _Alexandru Petrescu_, Jan 15 2023