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-3 of 3 results.

A333909 Numbers k such that phi(k) is the sum of 2 squares, where phi is the Euler totient function (A000010).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 11, 12, 15, 16, 17, 19, 20, 22, 24, 25, 27, 30, 32, 33, 34, 37, 38, 40, 41, 44, 48, 50, 51, 53, 54, 55, 57, 59, 60, 63, 64, 66, 68, 73, 74, 75, 76, 80, 82, 83, 85, 88, 91, 95, 96, 100, 101, 102, 106, 107, 108, 110, 111, 114, 117, 118, 120
Offset: 1

Views

Author

Amiram Eldar, Apr 09 2020

Keywords

Examples

			1 is a term since phi(1) = 1 = 0^2 + 1^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[120], SquaresR[2, EulerPhi[#]] > 0 &]
  • Python
    from itertools import count, islice
    from sympy import factorint, totient
    def A333909_gen(): # generator of terms
        return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(totient(n)).items()),count(1))
    A333909_list = list(islice(A333909_gen(),30)) # Chai Wah Wu, Jun 27 2022

Formula

c1 * x/log(x)^(3/2) < N(x) < c2 * x/log(x)^(3/2), where N(x) is the number of terms <= x, and c1 and c2 are two positive constants (Banks et al., 2005).

A333910 Numbers k such that psi(k) is the sum of 2 squares, where psi is the Dedekind psi function (A001615).

Original entry on oeis.org

1, 3, 7, 10, 17, 18, 19, 20, 21, 22, 27, 30, 31, 36, 40, 44, 45, 46, 50, 51, 55, 57, 58, 60, 66, 67, 70, 71, 72, 73, 79, 80, 88, 89, 92, 93, 94, 97, 99, 100, 103, 106, 115, 116, 118, 119, 120, 126, 127, 132, 133, 138, 140, 144, 145, 150, 154, 160, 162, 163, 165
Offset: 1

Views

Author

Amiram Eldar, Apr 09 2020

Keywords

Examples

			1 is a term since psi(1) = 1 = 0^2 + 1^2.
		

Crossrefs

Programs

  • Mathematica
    psi[1] = 1; psi[n_] := n * Times @@ (1 + 1/Transpose[FactorInteger[n]][[1]]); Select[Range[200], SquaresR[2, psi[#]] > 0 &]
  • Python
    from itertools import count, islice
    from collections import Counter
    from sympy import factorint
    def A333910_gen(): # generator of terms
        return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in sum((Counter(factorint(1+p))+Counter({p:e-1}) for p ,e in factorint(n).items()),start=Counter()).items()),count(1))
    A333910_list = list(islice(A333910_gen(),30)) # Chai Wah Wu, Jun 27 2022

Formula

c1 * x/log(x)^(3/2) < N(x) < c2 * x/log(x)^(3/2), where N(x) is the number of terms <= x, and c1 and c2 are two positive constants (Banks et al., 2005).

A363967 Numbers whose divisors can be partitioned into two disjoint sets whose both sums are squares.

Original entry on oeis.org

1, 3, 9, 22, 27, 30, 40, 63, 66, 70, 81, 88, 90, 94, 115, 119, 120, 138, 153, 156, 170, 171, 174, 184, 189, 190, 198, 210, 214, 217, 232, 264, 265, 270, 280, 282, 310, 318, 322, 323, 343, 345, 357, 360, 364, 376, 382, 385, 399, 400, 414, 416, 462, 468, 472, 495, 497
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2023

Keywords

Comments

If one of the two sets is empty then the term is a number whose sum of divisors is a square (A006532).
If k is a number such that (6*k)^2 is the sum of a twin prime pair (A037073), then (18*k^2)^2 - 1 is a term.
3 is the only prime term.

Examples

			9 is a term since its divisors, {1, 3, 9}, can be partitioned into the two disjoint sets, {1, 3} and {9}, whose sums, 1 + 3 = 4 = 2^2 and 9 = 3^2, are both squares.
		

Crossrefs

Subsequence of A333911.
A006532 is a subsequence.
Similar sequences: A333677, A360694.

Programs

  • Mathematica
    sqQ[n_] := IntegerQ[Sqrt[n]]; q[n_] := Module[{d = Divisors[n], s, p}, s = Total[d]; p = Position[Rest @ CoefficientList[Product[1 + x^i, {i, d}], x], _?(# > 0 &)] // Flatten; AnyTrue[p, sqQ[#] && sqQ[s - #] &]]; Select[Range[500], q]
Showing 1-3 of 3 results.