“Recurrence” for Mobius function times natural numbers

Excel cell formula, European dot-comma style:

=IF(OR(ROW()=1;COLUMN()=1);1;IF(ROW()=COLUMN();-(SUM(INDIRECT(ADDRESS(1;COLUMN())&":"&ADDRESS(COLUMN()-1;COLUMN())))+SUM(INDIRECT(ADDRESS(1;COLUMN())&":"&ADDRESS(COLUMN()-1;COLUMN())))/(COLUMN()-1));IF(ROW()>COLUMN();INDIRECT(ADDRESS(ROW()-COLUMN();COLUMN()));INDIRECT(ADDRESS(COLUMN();COLUMN()-ROW())))))

Excel cell formula, American dot-comma style:
=IF(OR(ROW()=1,COLUMN()=1),1,IF(ROW()=COLUMN(),-(SUM(INDIRECT(ADDRESS(1,COLUMN())&":"&ADDRESS(COLUMN()-1,COLUMN())))+SUM(INDIRECT(ADDRESS(1,COLUMN())&":"&ADDRESS(COLUMN()-1,COLUMN())))/(COLUMN()-1)),IF(ROW()>COLUMN(),INDIRECT(ADDRESS(ROW()-COLUMN(),COLUMN())),INDIRECT(ADDRESS(COLUMN(),COLUMN()-ROW())))))

Which outputs in the main diagonal:
1, -2, -3, 0, -5, 6, -7, 0, 0, 10, -11,…

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.