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.

A338534 a(n) is the smallest number k whose symmetric representation of sigma(k) consists of n regions (or parts) and whose areas are strictly decreasing towards the diagonal.

Original entry on oeis.org

1, 3, 9, 21, 81, 147, 441, 903, 2499, 6069, 15351, 29095, 80367, 153065, 366025, 643885
Offset: 1

Views

Author

Hartmut F. W. Hoft, Nov 01 2020

Keywords

Comments

For a(n) <= 750000 the regions in the symmetric representation of sigma(a(n)) have at most width of 2.

Examples

			a(5) = 81 is in this sequence since its symmetric representation of sigma is the first to consist of 5 regions [41, 15, 9, 15, 41] decreasing towards the diagonal.
63 is the only number smaller than 81 with 5 regions, but is not in the sequence since the regions of its symmetric representation of sigma are [32, 12, 16, 12, 32].
		

Crossrefs

Programs

  • Mathematica
    cd[n_, k_] := If[Divisible[n, k], 1, 0]
    legs[n_, len_] := Module[{tL = Map[Ceiling[(n + 1)/# - (# + 1)/2] &, Range[len]]}, tL - Append[Rest[tL], 0]]
    a237048[n_, len_] := Map[If[OddQ[#], cd[n, #], cd[n-#/2, #]]&, Range[len]]
    widths[n_, len_] := Drop[FoldList[Plus, 0, Map[(-1)^(#+1)&, Range[len]] a237048[n, len]], 1]
    regions[n_] := Module[{r=Floor[(Sqrt[8n+1]-1)/2], wL, wM, diag, sL, sLs, regs, lens}, wL=widths[n, r]; wM=Max[wL]; diag=Last[wL]; sL=legs[n, r]wL; sLs=SplitBy[sL, #!=0&]; regs=Select[Map[Fold[Plus, 0, #]&, sLs], #!=0&]; lens=Length[regs]; If[diag==0, {wM, Join[regs, Reverse[regs]]}, {wM, Join[Most[regs], {2Last[regs]-diag}, Reverse[Most[regs]]]}]]
    a338534[n_, b_] := Module[{k, r, len, s, list=Table[0, b]}, For[k=1, k<=n, k++, r=Last[regions[k]]; len=Length[r]; s=Take[r, Floor[(len+1)/2]]; If[AllTrue[Most[s]-Rest[s], #>0&]&&list[[len]]==0, list[[len]]=k]]; list]
    Take[a338534[750000, 20], 16] (* sequence data *)