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.

User: Walt Rorie-Baety

Walt Rorie-Baety's wiki page.

Walt Rorie-Baety has authored 4 sequences.

A228154 T(n,k) is the number of s in {1,...,n}^n having longest contiguous subsequence with the same value of length k; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 2, 2, 12, 12, 3, 108, 120, 24, 4, 1280, 1520, 280, 40, 5, 18750, 23400, 3930, 510, 60, 6, 326592, 423360, 65016, 7644, 840, 84, 7, 6588344, 8800008, 1241464, 132552, 13440, 1288, 112, 8, 150994944, 206622720, 26911296, 2622528, 244944, 22032, 1872, 144, 9
Offset: 1

Author

Walt Rorie-Baety, Aug 15 2013

Keywords

Examples

			T(1,1) =  1: [1].
T(2,1) =  2: [1,2], [2,1].
T(2,2) =  2: [1,1], [2,2].
T(3,1) = 12: [1,2,1], [1,2,3], [1,3,1], [1,3,2], [2,1,2], [2,1,3], [2,3,1], [2,3,2], [3,1,2], [3,1,3], [3,2,1], [3,2,3].
T(3,2) = 12: [1,1,2], [1,1,3], [1,2,2], [1,3,3], [2,1,1], [2,2,1], [2,2,3], [2,3,3], [3,1,1], [3,2,2], [3,3,1], [3,3,2].
T(3,3) =  3: [1,1,1], [2,2,2], [3,3,3].
Triangle T(n,k) begins:
.       1;
.       2,       2;
.      12,      12,       3;
.     108,     120,      24,      4;
.    1280,    1520,     280,     40,     5;
.   18750,   23400,    3930,    510,    60,    6;
.  326592,  423360,   65016,   7644,   840,   84,   7;
. 6588344, 8800008, 1241464, 132552, 13440, 1288, 112,  8;
		

Crossrefs

Row sums give: A000312.
Column k=1 gives: A055897.
Main diagonal gives: A000027.
Lower diagonal gives: 2*A180291.

Programs

  • Maple
    T:= proc(n) option remember; local b; b:=
          proc(m, s, i) option remember; `if`(m>i or s>m, 0,
            `if`(i=1, n, `if`(s=1, (n-1)*add(b(m, h, i-1), h=1..m),
             b(m, s-1, i-1) +`if`(s=m, b(m-1, s-1, i-1), 0))))
          end; forget(b);
          seq(add(b(k, s, n), s=1..k), k=1..n)
        end:
    seq(T(n), n=1..12);  # Alois P. Heinz, Aug 18 2013
  • Mathematica
    T[n_] := T[n] = Module[{b}, b[m_, s_, i_] := b[m, s, i] = If[m>i || s>m, 0, If[i == 1, n, If[s == 1, (n-1)*Sum[b[m, h, i-1], {h, 1, m}], b[m, s-1, i-1] + If[s == m, b[m-1, s-1, i-1], 0]]]]; Table[Sum[b[k, s, n], {s, 1, k}], {k, 1, n}]]; Table[ T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Mar 06 2015, after Alois P. Heinz *)

Formula

Sum_{k=1..n} k * T(n,k) = A228194(n). - Alois P. Heinz, Dec 23 2020

A182082 Number of pairs, (x,y), with x >= y, whose LCM does not exceed n.

Original entry on oeis.org

1, 3, 5, 8, 10, 15, 17, 21, 24, 29, 31, 39, 41, 46, 51, 56, 58, 66, 68, 76, 81, 86, 88, 99, 102, 107, 111, 119, 121, 135, 137, 143, 148, 153, 158, 171, 173, 178, 183, 194, 196, 210, 212, 220, 228, 233, 235, 249, 252, 260, 265, 273, 275, 286, 291, 302, 307, 312
Offset: 1

Author

Walt Rorie-Baety, Apr 10 2012

Keywords

Comments

Note that this is the asymmetric count. If all pairs (x,y) are counted, A061503 is obtained. - T. D. Noe, Apr 10 2012

Examples

			a(1000000) = 37429395, according to Project Euler problem #379.
		

Crossrefs

Partial sums of A018892.
Cf. A000005, A007875, A013661, A061503 (symmetric case).

Programs

  • Haskell
    a n = length [(x,y)| x <- [1..n], y <- [x..n], lcm x y <= n]
    
  • Mathematica
    Table[Count[Flatten[Table[LCM[i, j], {i, n}, {j, i, n}]], ?(# <= n &)], {n, 60}] (* _T. D. Noe, Apr 10 2012 *)
    nn = 100; (Accumulate[Table[DivisorSigma[0, n^2], {n, nn}]] + Range[nn])/2 (* T. D. Noe, Apr 10 2012 *)
  • PARI
    a(n)=(sum(k=1,n,numdiv(k^2))+n)/2 \\ Charles R Greathouse IV, Apr 10 2012

Formula

a(n) = Sum_{k=1..n} (d(k^2)+1)/2, where d is the number of divisors function (A000005). - Charles R Greathouse IV, Apr 10 2012
a(n) = Sum_{k=1..n} A007875(k) * floor(n/k). - Daniel Suteu, Jan 08 2021
a(n) ~ n * log(n)^2 /(4*zeta(2)) (see A018892 for a more accurate asymptotic formula). - Amiram Eldar, Feb 01 2025

A201992 Numbers whose binary representations are found in the Thue-Morse sequence.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 18, 19, 20, 22, 25, 26, 37, 38, 41, 44, 45, 50, 51, 52, 75, 76, 77, 82, 83, 89, 90, 101, 102, 105, 150, 153, 154, 165, 166, 179, 180, 203, 205, 210, 211, 300, 301, 306, 308, 331, 332, 358, 361, 406, 410, 421, 422, 601
Offset: 0

Author

Walt Rorie-Baety, Dec 07 2011

Keywords

Comments

Interpreting A010060 as a bit string, this sequence contains the decimal equivalents of the subsequences, in order.

Examples

			The binary representation of 21 (10101) has an overlapping square sequence (1X1X1, where X is any binary sequence, in this case, X = 0), and so is not in the sequence. Compare to A063037.
		

Crossrefs

Programs

  • Haskell
    a201992 = 0: concatMap (\n -> Set.toList . Set.fromList . map binRep . filter ((==[1]).take 1) . window n . take (n*2^n) $ a010060) [1..] where
      {window n = takeWhile (full . drop (n-1)) . map (take n) .  tails; binRep = foldl' (\a b -> 2*a+b) 0}; full = not . null
  • Mathematica
    Module[{nn=10000,tm},tm=Table[ThueMorse[n],{n,0,nn}];Join[{0},Position[ Table[ If[SequenceCount[tm,IntegerDigits[k,2]]>0,1,0],{k,1000}], 1]]]// Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 03 2018 *)

Extensions

Helper function added and name of value in program changed for better understanding by Walt Rorie-Baety, Mar 25 2012

A179180 Partial sums of A007895.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 8, 10, 11, 13, 15, 17, 20, 21, 23, 25, 27, 30, 32, 35, 38, 39, 41, 43, 45, 48, 50, 53, 56, 58, 61, 64, 67, 71, 72, 74, 76, 78, 81, 83, 86, 89, 91, 94, 97, 100, 104, 106, 109, 112, 115, 119, 122, 126, 130, 131, 133, 135, 137, 140, 142, 145
Offset: 0

Author

Walt Rorie-Baety, Jun 30 2010

Keywords

Comments

Total number of summands in Zeckendorf representations of all the numbers 1,2,...,n (for n>0); see the conjecture at A214979. - Clark Kimberling, Oct 23 2012

Examples

			For n = 6, a(n) = 1+1+1+2+1+2 = 8.
		

Crossrefs

Programs

  • Mathematica
    s = Reverse[Table[Fibonacci[n + 1], {n, 1, 70}]];
    t2 = Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, s]][[2, 1]], # > 0 &]] &, Range[z]]; v[n_] := Sum[t2[[k]], {k, 1, n}];
    v1 = Table[v[n], {n, 1, z}]
    (* Peter J. C. Moses, Oct 18 2012 *)
    DigitCount[Select[Range[0, 500], BitAnd[#, 2*#] == 0&], 2, 1] // Accumulate (* Jean-François Alcover, Jan 25 2018 *)

Formula

a(n) ~ c * n * log(n), where c = (phi-1)/(sqrt(5)*log(phi)) = 0.574369... and phi is the golden ratio (A001622) (Ballot, 2013). - Amiram Eldar, Dec 09 2021

Extensions

Corrected term a(17); the working list of the terms were not in order. Walt Rorie-Baety, Jun 30 2010
Extended by Clark Kimberling, Oct 23 2012