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.

Previous Showing 11-20 of 29 results. Next

A004197 Triangle read by rows. T(n, k) = n - k if n - k < k, otherwise k.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2
Offset: 0

Views

Author

Keywords

Comments

Table of min(x,y), where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),...
Highest power of 6 that divides A036561. - Fred Daniel Kline, May 29 2012
Triangle T(n,k) read by rows: T(n,k) = min(k,n-k). - Philippe Deléham, Feb 25 2014

Examples

			From _Philippe Deléham_, Feb 25 2014: (Start)
Top left corner of table:
  0 0 0 0
  0 1 1 1
  0 1 2 2
  0 1 2 3
Triangle T(n,k) begins:
  0;
  0, 0;
  0, 1, 0;
  0, 1, 1, 0;
  0, 1, 2, 1, 0;
  0, 1, 2, 2, 1, 0;
  0, 1, 2, 3, 2, 1, 0;
  0, 1, 2, 3, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0;
  ... (End)
		

Crossrefs

Similar to but strictly different from A087062 and A261684.
Row sums give A002620. - Reinhard Zumkeller, Jul 27 2005
Positions of zero are given in A117142. - Ridouane Oudra, Apr 30 2019

Programs

  • Haskell
    a004197 n k = a004197_tabl !! n !! k
    a004197_tabl = map a004197_row [0..]
    a004197_row n = hs ++ drop (1 - n `mod` 2) (reverse hs)
       where hs = [0..n `div` 2]
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Maple
    T := (n, k) -> if n - k < k then n - k else k fi:
    for n from 0 to 9 do seq(T(n, k), k=0..n) od; # Peter Luschny, May 07 2023
  • Mathematica
    Flatten[Table[IntegerExponent[2^(n - k) 3^k, 6], {n, 0, 20}, {k, 0, n}]] (* Fred Daniel Kline, May 29 2012 *)
  • PARI
    T(x,y)=min(x,y) \\ Charles R Greathouse IV, Feb 07 2017

Formula

a(n) = A003983(n) - 1.
G.f.: x*y/((1-x)*(1-y)*(1-x*y)). - Franklin T. Adams-Watters, Feb 06 2006
2^T(n,k) = A144464(n,k), 3^T(n,k) = A152714(n,k), 4^T(n,k) = A152716(n,k), 5^T(n,k) = A152717(n,k). - Philippe Deléham, Feb 25 2014
a(n) = (1/2)*(t - 1 - abs(t^2 - 2*n - 1)), where t = floor(sqrt(2*n+1)+1/2). - Ridouane Oudra, May 03 2019

Extensions

Mathematica program fixed by Harvey P. Dale, Nov 26 2020
Name edited by Peter Luschny, May 07 2023

A087029 Number of lunar divisors of n (unbounded version).

Original entry on oeis.org

9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 90, 16, 14, 12, 10, 8, 6, 4, 2, 16, 16, 72, 14, 12, 10, 8, 6, 4, 2, 14, 14, 14, 56, 12, 10, 8, 6, 4, 2, 12, 12, 12, 12, 42, 10, 8, 6, 4, 2, 10, 10, 10, 10, 10, 30, 8, 6, 4, 2, 8, 8, 8, 8, 8, 8, 20, 6, 4, 2, 6, 6, 6, 6, 6, 6, 6, 12, 4, 2, 4, 4, 4, 4
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 19 2003

Keywords

Comments

Number of d, 1 <= d < infinity, such that there exists an e, 1 <= e < infinity, with d*e = n, where * is lunar multiplication.

Examples

			The 18 divisors of 10 are 1, 2, ..., 9, 10, 20, 30, ..., 90, so a(10) = 18.
		

Crossrefs

Cf. A087062 (lunar product).
Cf. A087028, A087083, A186443, A186510. See A189506 for the actual divisors.
See A067399 for the base-2 version.

Programs

  • Maple
    (Uses programs from A087062. This crude program is valid for n <= 99.) dd2 := proc(n) local t1,t2,i,j; t1 := []; for i from 1 to 99 do for j from i to 99 do if dmul(i,j) = n then t1 := [op(t1),i,j]; fi; od; od; t1 := convert(t1,set); t2 := sort(convert(t1,list)); nops(t2); end;
  • PARI
    A087029(n)=#A189506_row(n) \\ To be optimized. - M. F. Hasler, Nov 15 2018

Extensions

More terms from David Applegate, Nov 07 2003
Minor edits by M. F. Hasler, Nov 15 2018

A087636 Number of n-digit lunar primes.

Original entry on oeis.org

0, 18, 81, 1539, 20457, 242217, 2894799, 33535839, 381591711
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 26 2003

Keywords

Comments

Although a(1) through a(6) are divisible by 9, a(7) is not.

Crossrefs

Cf. A087062 (lunar product), A087097 (lunar primes), A087638 (partial sums).

Programs

  • PARI
    A87636=[]; A087636(n)={while(#A87636A087097(k)); A87636[n]} \\ Store results in array A87636 to avoid re-calculation. - M. F. Hasler, Nov 15 2018

Extensions

a(6)-a(9) from David Applegate, Nov 07 2003

A087052 Lunar triangular numbers: 0+1+2+3+...+n, where + is lunar addition.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199
Offset: 0

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 19 2003

Keywords

Comments

Differs from A087121 after 100 terms.
If duplicates are removed we get A051885. - N. J. A. Sloane, Jan 25 2011

Crossrefs

Cf. A051885.

Programs

  • Maple
    (Continuing from A087062) dt := proc(n) local i,t1; t1 := 0; for i from 1 to n do t1 := dadd(t1,i); od: t1; end;

A087028 Number of bounded (<=n) lunar divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 9, 9, 9, 8, 7, 6, 5, 4, 3, 2, 8, 8, 8, 8, 7, 6, 5, 4, 3, 2, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 6, 6, 6, 6, 6, 6, 5, 4, 3, 2, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 19, 10, 9, 8, 7, 6, 5, 4, 3, 2, 100, 91, 17, 15, 13, 11, 9, 7, 5, 3, 25, 25, 81, 22, 19, 16, 13, 10, 7, 4, 22, 22, 22, 64, 19, 16, 13, 10, 7, 4, 19, 19, 19, 19, 49, 16, 13, 10, 7, 4, 16, 16, 16, 16, 16, 36, 13, 10, 7, 4, 13, 13, 13, 13, 13, 13, 25, 10, 7, 4, 10, 10, 10, 10, 10, 10, 10, 16, 7, 4, 7, 7, 7, 7, 7, 7, 7, 7, 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 17
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 19 2003

Keywords

Comments

Number of d, 1 <= d <= n, such that there exists an e, 1 <= e <= n, with d*e = n, where * is lunar multiplication.

Examples

			The 10 divisors of 10 <= 10 are 1, 2, ..., 9, 10.
a(100) = 19, since the lunar divisors of 100 <= 100 are 1, 2, ..., 9, 10, 20, ..., 90, 100.
		

Crossrefs

Programs

  • Maple
    (Uses programs from A087062) dd1 := proc(n) local t1,t2,i,j; t1 := []; for i from 1 to n do for j from i to n do if dmul(i,j) = n then t1 := [op(t1),i,j]; fi; od; od; t1 := convert(t1,set); t2 := sort(convert(t1,list)); nops(t2); end;

A087638 Number of lunar primes with <= n digits.

Original entry on oeis.org

0, 18, 99, 1638, 22095, 264312, 3159111, 36694950, 418286661
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 26 2003

Keywords

Comments

Partial sums of A087636. - M. F. Hasler, Nov 15 2018

Crossrefs

Cf. A087062 (lunar product), A087097 (lunar primes), A087636 (#{n-digit primes}).

Programs

Extensions

a(6)-a(9) from David Applegate, Nov 07 2003

A261684 Array T(n,k) = lunar product n*k (n >= 0, k >= 0) read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 10, 2, 3, 4, 5, 5, 4, 3, 2, 10, 0, 0, 11, 10, 3, 4, 5, 6, 5, 4, 3, 10, 11, 0
Offset: 0

Views

Author

N. J. A. Sloane, Sep 06 2015

Keywords

Comments

See A087061 for definition. Note that 0+x = x and 9*x = x for all x.

Examples

			Lunar multiplication table begins:
0 0 0 0 0 0 ...
0 1 1 1 1 1 ...
0 1 2 2 2 2 ...
0 1 2 3 3 3 ...
0 1 2 3 4 4 ...
0 1 2 3 4 5 ...
....
		

Crossrefs

Cf. A087061 (addition).
See A087062 for a version that excludes the zero row and column.
Similar to but different from A003983.

Programs

  • Maple
    # convert decimal to string:
    rec := proc(n) local t0,t1,e,l; if n <= 0 then RETURN([[0],1]); fi; t0 := n mod 10; t1 := (n-t0)/10; e := [t0]; l := 1; while t1 <> 0 do t0 := t1 mod 10; t1 := (t1-t0)/10; l := l+1; e := [op(e),t0]; od; RETURN([e,l]); end;
    # convert string to decimal:
    cer := proc(ep) local i,e,l,t1; e := ep[1]; l := ep[2]; t1 := 0; if l <= 0 then RETURN(t1); fi; for i from 1 to l do t1 := t1+10^(i-1)*e[i]; od; RETURN(t1); end;
    # lunar addition:
    dadd := proc(m,n) local i,r1,r2,e1,e2,l1,l2,l,l3,t0; r1 := rec(m); r2 := rec(n); e1 := r1[1]; e2 := r2[1]; l1 := r1[2]; l2 := r2[2]; l := max(l1,l2); l3 := min(l1,l2); t0 := array(1..l); for i from 1 to l3 do t0[i] := max(e1[i],e2[i]); od; if l>l3 then for i from l3+1 to l do if l1>l2 then t0[i] := e1[i]; else t0[i] := e2[i]; fi; od; fi; cer([t0,l]); end;
    # lunar multiplication:
    dmul := proc(m,n) local k,i,j,r1,r2,e1,e2,l1,l2,l,t0; r1 := rec(m); r2 := rec(n); e1 := r1[1]; e2 := r2[1]; l1 := r1[2]; l2 := r2[2]; l := l1+l2-1; t0 := array(1..l); for i from 1 to l do t0[i] := 0; od; for i from 1 to l2 do for j from 1 to l1 do k := min(e2[i],e1[j]); t0[i+j-1] := max(t0[i+j-1],k); od; od; cer([t0,l]); end;
    # to produce the b-file:
    M:=199; c:=0; for n from 0 to M do for k from 0 to n do lprint(c,dmul(n-k,k)); c:=c+1; od: od:

A343042 Array T(n, k), n, k >= 0, read by antidiagonals; lunar multiplication table for the factorial base.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 6, 3, 0, 0, 2, 8, 8, 2, 0, 0, 3, 6, 9, 6, 3, 0, 0, 6, 8, 8, 8, 8, 6, 0, 0, 7, 24, 9, 12, 9, 24, 7, 0, 0, 8, 26, 30, 14, 14, 30, 26, 8, 0, 0, 9, 30, 33, 24, 15, 24, 33, 30, 9, 0, 0, 8, 32, 32, 26, 30, 30, 26, 32, 32, 8, 0
Offset: 0

Views

Author

Rémy Sigrist, Apr 05 2021

Keywords

Comments

To compute T(n, k):
- write the factorial base representations of n and of k on two lines, right aligned,
- to "multiply" two digits: take the smallest,
- to "add" two digits: take the largest,
- for example, for T(13, 14):
12 -> 2 0 1
14 -> x 2 1 0
-------
0 0 0
1 0 1
+ 2 0 1
-----------
2 1 1 1 0 -> 272 = T(13, 14)
See A343040 for the corresponding addition table.

Examples

			Array T(n, k) begins:
  n\k|  0  1   2   3   4   5    6    7    8    9   10   11   12
  ---+---------------------------------------------------------
    0|  0  0   0   0   0   0    0    0    0    0    0    0    0
    1|  0  1   2   3   2   3    6    7    8    9    8    9    6
    2|  0  2   6   8   6   8   24   26   30   32   30   32   24
    3|  0  3   8   9   8   9   30   33   32   33   32   33   30
    4|  0  2   6   8  12  14   24   26   30   32   36   38   48
    5|  0  3   8   9  14  15   30   33   32   33   38   39   54
    6|  0  6  24  30  24  30  120  126  144  150  144  150  120
    7|  0  7  26  33  26  33  126  127  152  153  152  153  126
    8|  0  8  30  32  30  32  144  152  150  152  150  152  144
    9|  0  9  32  33  32  33  150  153  152  153  152  153  150
   10|  0  8  30  32  36  38  144  152  150  152  156  158  168
   11|  0  9  32  33  38  39  150  153  152  153  158  159  174
   12|  0  6  24  30  48  54  120  126  144  150  168  174  240
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).
T(n, 0) = 0.

A343046 Array T(n, k), n, k >= 0, read by antidiagonals; lunar multiplication table for the primorial base.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 6, 3, 0, 0, 2, 8, 8, 2, 0, 0, 3, 6, 9, 6, 3, 0, 0, 6, 8, 8, 8, 8, 6, 0, 0, 7, 30, 9, 12, 9, 30, 7, 0, 0, 8, 32, 36, 14, 14, 36, 32, 8, 0, 0, 9, 36, 39, 30, 15, 30, 39, 36, 9, 0, 0, 8, 38, 38, 32, 36, 36, 32, 38, 38, 8, 0
Offset: 0

Views

Author

Rémy Sigrist, Apr 05 2021

Keywords

Comments

To compute T(n, k):
- write the primorial base representations of n and of k on two lines, right aligned,
- to "multiply" two digits: take the smallest,
- to "add" two digits: take the largest,
- for example, for T(9, 10):
9 -> 1 1 1
10 -> x 1 2 0
-------
0 0 0
1 1 1
+ 1 1 1
-----------
1 1 1 1 0 -> 248 = T(9, 10)
See A343044 for the corresponding addition table.

Examples

			Array T(n, k) begins:
  n\k|  0  1   2   3   4   5    6    7    8    9   10   11   12
  ---+---------------------------------------------------------
    0|  0  0   0   0   0   0    0    0    0    0    0    0    0
    1|  0  1   2   3   2   3    6    7    8    9    8    9    6  ->  A328841
    2|  0  2   6   8   6   8   30   32   36   38   36   38   30
    3|  0  3   8   9   8   9   36   39   38   39   38   39   36
    4|  0  2   6   8  12  14   30   32   36   38   42   44   60
    5|  0  3   8   9  14  15   36   39   38   39   44   45   66
    6|  0  6  30  36  30  36  210  216  240  246  240  246  210
    7|  0  7  32  39  32  39  216  217  248  249  248  249  216
    8|  0  8  36  38  36  38  240  248  246  248  246  248  240
    9|  0  9  38  39  38  39  246  249  248  249  248  249  246
   10|  0  8  36  38  42  44  240  248  246  248  252  254  270
   11|  0  9  38  39  44  45  246  249  248  249  254  255  276
   12|  0  6  30  36  60  66  210  216  240  246  270  276  420
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).
T(n, 0) = 0.
T(n, 1) = A328841(n).
T(n, n) = A343047(n).

A087082 Take bounded lunar divisors of n as defined in A087028, add them using normal addition. See A087121 for their lunar sum.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 55, 56, 56, 55, 53, 50, 46, 41, 35, 28, 64, 65, 66, 65, 63, 60, 56, 51, 45, 38, 72, 73, 74, 75, 73, 70, 66, 61, 55, 48, 79, 80, 81, 82, 83, 80, 76, 71, 65, 58, 85, 86, 87, 88, 89, 90, 86, 81, 75, 68, 90, 91, 92, 93, 94, 95, 96, 91, 85, 78
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 19 2003

Keywords

Crossrefs

Extensions

More terms from David Applegate, Nov 07 2003
Previous Showing 11-20 of 29 results. Next