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.

A340102 Number of factorizations of 2n + 1 into an odd number of odd factors > 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 30 2020

Keywords

Examples

			The factorizations for 2n + 1 = 135, 225, 315, 405, 675, 1155, 1215:
  135      225      315      405         675         1155      1215
  3*5*9    5*5*9    5*7*9    5*9*9       3*3*75      3*5*77    3*5*81
  3*3*15   3*3*25   3*3*35   3*3*45      3*5*45      3*7*55    3*9*45
           3*5*15   3*5*21   3*5*27      3*9*25      5*7*33    5*9*27
                    3*7*15   3*9*15      5*5*27      3*11*35   9*9*15
                             3*3*3*3*5   5*9*15      5*11*21   3*15*27
                                         3*15*15     7*11*15   3*3*135
                                         3*3*3*5*5             3*3*3*5*9
                                                               3*3*3*3*15
		

Crossrefs

The version for partitions is A160786, ranked by A300272.
The not necessarily odd-length version is A340101.
A000009 counts partitions into odd parts, ranked by A066208.
A001055 counts factorizations, with strict case A045778.
A027193 counts partitions of odd length, ranked by A026424.
A058695 counts partitions of odd numbers, ranked by A300063.
A316439 counts factorizations by product and length.

Programs

  • Maple
    g:= proc(n, k, t) option remember; `if`(n>k, 0, t)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d, 1-t)),
              d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= n-> `if`(n=0, 0, g(2*n+1$2, 1)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],OddQ[Length[#]]&&OddQ[Times@@#]&]],{n,1,100,2}];