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

A064874 Second of four sequences representing the lexicographical minimal decomposition of n in 4 squares: n = A064873(n)^2 + a(n)^2 + A064875(n)^2 + A064876(n)^2.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 1, 1, 0, 0, 0, 1, 0, 1, 2, 2, 2, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 3, 2, 0, 1, 1, 4, 0, 0, 1, 0, 0, 1, 1, 2, 2, 0, 1, 1, 0, 1, 1, 0, 0, 1, 3, 0, 1, 3, 3, 0, 0, 0, 1, 2, 2, 2, 2, 0, 0, 0, 1, 2, 0, 1, 1, 4, 0, 0, 1, 1, 2, 2, 2, 4, 0, 0, 1, 0, 0, 1, 1, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 10 2001

Keywords

Examples

			a(19) = 1: 19 = A064873(19)^2 + a(19)^2 + A064875(19)^2 + A064876(19)^2 = 0 + 1 + 9 + 9 and the other decomposition (1, 1, 1, 4) is greater than (0, 1, 3, 3).
		

Crossrefs

A064876 Last of four sequences representing the lexicographical minimal decomposition of n in 4 squares: n = A064873(n)^2 + A064874(n)^2 + A064875(n)^2 + a(n)^2.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 4, 4, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 4, 7, 7, 7, 6, 7, 7, 7, 6, 7, 7, 7, 7, 6, 6, 6, 8, 8, 8, 7, 8, 8, 6, 6, 6, 8, 7, 7, 6, 8, 7, 7, 8, 9, 9, 9, 8, 9, 9, 9, 6, 8, 9, 9, 9, 8, 9, 9, 8, 9, 7, 7, 10, 10, 10
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 10 2001

Keywords

Examples

			a(18) = 3: 18 = A064873(18)^2 + A064874(18)^2 + A064875(18)^2 + a(18)^2 = 0 + 0 + 9 + 9 and the other decompositions (0, 1, 1, 4) and (1, 2, 2, 3) are greater than (0, 0, 3, 3).
		

Crossrefs

A064875 Third of four sequences representing the lexicographical minimal decomposition of n in four squares: n = A064873(n)^2 + A064874(n)^2 + a(n)^2 + A064876(n)^2.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 2, 2, 2, 2, 0, 1, 3, 3, 2, 2, 3, 3, 2, 0, 1, 1, 1, 2, 2, 2, 4, 4, 3, 3, 0, 1, 1, 1, 2, 4, 4, 3, 2, 3, 3, 3, 4, 0, 1, 1, 4, 2, 2, 2, 4, 2, 3, 3, 3, 5, 5, 5, 0, 1, 1, 3, 2, 2, 5, 5, 6, 3, 5, 5, 6, 3, 5, 5, 4, 0, 1, 1, 4, 2, 2, 2, 6, 5, 3, 3, 3, 5, 3, 3, 4, 4, 7, 7, 0, 1, 1, 1, 2
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 10 2001

Keywords

Examples

			a(19) = 3: 19 = A064873(19)^2 + A064874(19)^2 + a(19)^2 + A064876(19)^2 = 0 + 1 + 9 + 9 and the other decomposition (1, 1, 1, 4) is greater than (0, 1, 3, 3).
		

Crossrefs

A064877 a(n) = n - (A064873(n) + A064874(n) + A064875(n) + A064876(n)).

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 2, 2, 4, 6, 6, 6, 6, 8, 8, 8, 12, 12, 12, 12, 14, 14, 14, 14, 16, 20, 20, 20, 20, 22, 22, 22, 24, 24, 26, 26, 30, 30, 30, 30, 32, 32, 32, 32, 34, 36, 36, 36, 36, 42, 42, 42, 42, 44, 44, 44, 44, 46, 48, 48, 48, 50, 50, 50, 56, 56, 56, 54, 58, 58, 56, 56, 60, 62
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 10 2001

Keywords

Crossrefs

A072401 1 iff n is of the form 4^m*(8k+7).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 16 2002

Keywords

Comments

Characteristic function of A004215, indicating numbers not the sum of 3 integer squares.
a(n) + 1 is the smallest positive number such that (a(n) + 1) * n is the sum of three squares. - Peter Schorn, Jul 18 2023

Crossrefs

Programs

  • Mathematica
    A072400[n_] := Mod[If[Mod[n, 4] == 0, n/4^IntegerExponent[n, 4], n], 8];
    a[n_] := 1 - Sign[7 - A072400[n]];
    Table[a[n], {n, 0, 96}] (* Jean-François Alcover, Dec 13 2021 *)
  • PARI
    a(n) = if(n, (n >> (2*valuation(n, 4))) % 8 == 7, 0); \\ Amiram Eldar, May 15 2025
  • Python
    def A072401(n): return ((m:=(~n&n-1).bit_length())&1^1)&int((n>>m)&7==7) # Chai Wah Wu, Aug 01 2023
    

Formula

a(n) = 1 - A057427(7 - A072400(n)).
a(A004215(k)) = 1 for k>0.
a(n) = A057427(A064873(n)).
For n<112: a(n) = A064873(n), but A064873(112) = 2, as also a(112 - 1) = 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/6. - Amiram Eldar, May 15 2025
Showing 1-5 of 5 results.