login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319929 Minimal arithmetic function similar to multiplication with separate rules for odd and even products. 4
1, 2, 2, 3, 0, 3, 4, 2, 2, 4, 5, 0, 5, 0, 5, 6, 2, 4, 4, 2, 6, 7, 0, 7, 0, 7, 0, 7, 8, 2, 6, 4, 4, 6, 2, 8, 9, 0, 9, 0, 9, 0, 9, 0, 9, 10, 2, 8, 4, 6, 6, 4, 8, 2, 10, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 12, 2, 10, 4, 8, 6, 6, 8, 4, 10, 2, 12 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This table is akin to multiplication in that it is associative, 1 is the identity and 0 takes any number to 0. Associativity is proved by checking eight cases of three ordered odd and even numbers. Distributivity works except if an even number is partitioned into a sum of two odd numbers.

LINKS

Table of n, a(n) for n=1..78.

FORMULA

a(n, k) = n + k - 1 if n is odd and k is odd;

a(n, k) = n if n is even and k is odd;

a(n, k) = k if n is odd and k is even;

a(n, k) = 0 if n is even and k is even.

EXAMPLE

a(3,5)=3+5-1=7, a(4,7)=4, a(8,8)=0.

Array begins:

   1  2  3  4  5  6  7  8  9 10 ...

   2  0  2  0  2  0  2  0  2  0 ...

   3  2  5  4  7  6  9  8 11 10 ...

   4  0  4  0  4  0  4  0  4  0 ...

   5  2  7  4  9  6 11  8 13 10 ...

   6  0  6  0  6  0  6  0  6  0 ...

   7  2  9  4 11  6 13  8 15 10 ...

   8  0  8  0  8  0  8  0  8  0 ...

   9  2 11  4 13  6 15  8 17 10 ...

  10  0 10  0 10  0 10  0 10  0 ...

  ...

MATHEMATICA

Table[Function[n, If[OddQ@ n, If[OddQ@ k, n + k - 1, k], If[OddQ@ k, n, 0]]][m - k + 1], {m, 12}, {k, m}] // Flatten (* Michael De Vlieger, Mar 24 2019 *)

PROG

(PARI) T(n, k) = if (n%2, if (k%2, n+k-1, k), if (k%2, n, 0));

matrix(6, 6, n, k, T(n, k)) \\ Michel Marcus, Dec 22 2018

CROSSREFS

Cf. A322630, A322744, A327259, A327263.

Sequence in context: A318448 A103516 A233558 * A129234 A213081 A127446

Adjacent sequences:  A319926 A319927 A319928 * A319930 A319931 A319932

KEYWORD

nonn,tabl,easy

AUTHOR

David Lovler, Dec 17 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 7 14:34 EDT 2020. Contains 335495 sequences. (Running on oeis4.)