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.

A073424 Triangle read by rows: T(m,n) = parity of 0^n + 0^m, n = 0,1,2,3 ..., m = 0,1,2,3, ... n.

Original entry on oeis.org

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

Views

Author

Jeremy Gardiner, Jul 30 2002

Keywords

Comments

Parity of the sums of two powers of any even number.

Examples

			a(3) = 1 because (2k)^2 + (2k)^0 = 4k^2 + 1 is odd.
Triangle begins :
  0
  1, 0
  1, 0, 0
  1, 0, 0, 0
  1, 0, 0, 0, 0
  1, 0, 0, 0, 0, 0
  1, 0, 0, 0, 0, 0, 0
  1, 0, 0, 0, 0, 0, 0, 0
  1, 0, 0, 0, 0, 0, 0, 0, 0
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0 - _Philippe Deléham_, Feb 11 2012
		

Crossrefs

Programs

  • Maple
    0, seq(op([1,0$n]), n=1..20); # Robert Israel, Mar 01 2016
  • Mathematica
    Array[If[# == 1, {0}, PadRight[{1}, #]] &, 14] // Flatten (* or *)
    Unprotect[Power]; Power[0, 0] = 1; Protect[Power]; Table[0^m + 0^n - 2 Boole[m == n == 0], {n, 0, 14}, {m, 0, n}] // Flatten (* Michael De Vlieger, Aug 22 2018 *)
  • Python
    from math import isqrt
    def A073424(n): return int((k:=n<<1)==(m:=isqrt(k))*(m+1)) if n else 0 # Chai Wah Wu, Nov 09 2024

Formula

a(n) = parity [ (2k)^n + (2k)^m, n = 0, 1, 2, 3 ..., m = 0, 1, 2, 3, ... n ]
T(n,0) = 1- 0^n, T(n,k) = 0 for k>0. - Philippe Deléham, Feb 11 2012
G.f.: Theta_2(0,sqrt(x))/(2*x^(1/8))-1, where Theta_2 is a Jacobi theta function. - Robert Israel, Mar 01 2016
For n>0, a(n) = 1 if and only if n is in A000217. - Chai Wah Wu, Nov 09 2024