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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

6, 42, 182, 650, 930, 4830, 7482, 9506, 12882, 13572, 16770, 79242, 167690, 181902, 228006, 289982, 380072, 3480090, 5209806, 6872262, 10102862, 16068072, 56002772, 56648202, 59174556, 70299840, 74831150, 123287712, 261517412, 342601590, 356322252, 455459622, 536223492, 1057452842
Offset: 1

Views

Author

Alexandru Petrescu, Jan 15 2023

Keywords

Comments

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

Examples

			9506 is a term because 9506 = 97*98 and phi(9506) = 4032 = 63*64.
		

Crossrefs

Intersection of A002378 and A236386.

Programs

  • Maple
    lastv:= 1: R:= NULL: count:= 0:
    for n from 3 while count < 50 do
      v:= numtheory:-phi(n);
      if issqr(4*v*lastv+1) then
        R:= R, n*(n-1); count:= count+1;
        fi;
      lastv:= v;
    od:
    R; # Robert Israel, Feb 15 2023
  • Mathematica
    Select[Table[n*(n + 1), {n, 1, 100000}], IntegerQ @ Sqrt[4*EulerPhi[#] + 1] &] (* Amiram Eldar, Jan 15 2023 *)
    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 *)
  • PARI
    for(k=1, 10^5, my(n=k*(k+1), p=eulerphi(n)); if(issquare(4*p+1), print1(n,", ")))

A360944 Numbers m such that phi(m) is a triangular number, where phi is the Euler totient function (A000010).

Original entry on oeis.org

1, 2, 7, 9, 11, 14, 18, 22, 29, 37, 57, 58, 63, 67, 74, 76, 79, 108, 114, 126, 134, 137, 143, 155, 158, 175, 183, 191, 211, 225, 231, 244, 248, 274, 277, 286, 308, 310, 329, 341, 350, 366, 372, 379, 382, 396, 417, 422, 423, 450, 453, 462, 554, 556, 604, 623, 631, 658, 682
Offset: 1

Views

Author

Bernard Schott, Feb 26 2023

Keywords

Comments

Subsequence of primes is A055469 because in this case phi(k(k+1)/2+1) = k(k+1)/2.
Subsequence of triangular numbers is A287472.

Examples

			phi(57) = 36 = 8*9/2, a triangular number; so 57 is a term of the sequence.
		

Crossrefs

Similar, but with phi(m) is: A039770 (square), A078164 (biquadrate), A096503 (repdigit), A117296 (palindrome), A236386 (oblong).

Programs

  • Maple
    filter := m ->  issqr(1 + 8*numtheory:-phi(m)) : select(filter, [$(1 .. 700)]);
  • Mathematica
    Select[Range[700], IntegerQ[Sqrt[8 * EulerPhi[#] + 1]] &] (* Amiram Eldar, Feb 27 2023 *)
  • PARI
    isok(m) = ispolygonal(eulerphi(m), 3); \\ Michel Marcus, Feb 27 2023
    
  • Python
    from itertools import islice, count
    from sympy.ntheory.primetest import is_square
    from sympy import totient
    def A360944_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:is_square((totient(n)<<3)+1), count(max(1,startvalue)))
    A360944_list = list(islice(A360944_gen(),20)) # Chai Wah Wu, Feb 28 2023
Showing 1-2 of 2 results.