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-18 of 18 results.

A062813 a(n) = Sum_{i=0..n-1} i*n^i.

Original entry on oeis.org

0, 2, 21, 228, 2930, 44790, 800667, 16434824, 381367044, 9876543210, 282458553905, 8842413667692, 300771807240918, 11046255305880158, 435659737878916215, 18364758544493064720, 824008854613343261192, 39210261334551566857170, 1972313422155189164466189, 104567135734072022160664820
Offset: 1

Views

Author

Olivier Gérard, Jun 23 2001

Keywords

Comments

Largest Katadrome (number with digits in strict descending order) in base n.
The largest permutational number (A134640) of order n. These numbers are isomorphic with antidiagonal permutation matrices of order n. Where diagonal matrices are a[i,1+n-i]=1 {i=1,n} a[i<>1+n-i]=0 for smallest permutational numbers of order n see A023811. - Artur Jasinski, Nov 07 2007
Permutational numbers A134640 isomorphic with permutation matrix generators of cyclic groups, n-th root of unity matrices. - Artur Jasinski, Nov 07 2007
Rephrasing: Largest pandigital number in base n (in the sense of A050278, which is base 10); e.g., a(10) = A050278(3265920), its final term. With a(1) = 1 instead of 0, also accommodates unary (A000042). - Rick L. Shepherd, Jul 10 2017

Crossrefs

Last elements of rows of A061845 (for n>1).

Programs

  • Haskell
    a062813 n = foldr (\dig val -> val * n + dig) 0 [0 .. n - 1]
    -- Reinhard Zumkeller, Aug 29 2014
    
  • Maple
    0,seq(n*((n-2)*n^n + 1)/(n-1)^2,n=2..100); # Robert Israel, Sep 03 2014
  • Mathematica
    Table[Sum[i*n^i, {i, 0, -1 + n}], {n, 17}] (* Olivier Gérard, Jun 23 2001 *)
    a[n_] := FromDigits[ Range[ n-1, 0, -1], n]; Array[a, 18] (* Robert G. Wilson v, Sep 03 2014 *)
  • PARI
    a(n) = sum(i=0,n-1,i*n^i)
    
  • PARI
    a(n) = if (n==1,0, my(t=n^n); t-(t-n)/(n-1)^2); \\ Joerg Arndt, Sep 03 2014
    
  • Python
    def A062813(n): return (m:=n**n)-(m-n)//(n-1)**2 if n>1 else 0 # Chai Wah Wu, Mar 18 2024

Formula

a(n) = n^n - (n^n-n)/(n-1)^2 for n>1. - Dean Hickerson, Jun 26 2001
a(n) = A134640(n, A000142(n)). - Reinhard Zumkeller, Aug 29 2014

A061845 Numbers that have one of every digit in some base.

Original entry on oeis.org

2, 11, 15, 19, 21, 75, 78, 99, 108, 114, 120, 135, 141, 147, 156, 177, 180, 198, 201, 210, 216, 225, 228, 694, 698, 714, 722, 738, 742, 894, 898, 954, 970, 978, 990, 1014, 1022, 1054, 1070, 1102, 1110, 1138, 1142, 1178, 1190, 1202, 1210, 1294, 1298, 1334
Offset: 2

Views

Author

Erich Friedman, Jun 23 2001

Keywords

Comments

Also known as pandigital numbers, especially in base 10.

Examples

			Base 3 values are 102_3 = 11, 120_3 = 15, 201_3 = 19, 210_3 = 21.
Triangle begins:
    2;
   11,  15,  19,  21;
   75,  78,  99, 108, 114, 120, 135, 141, 147, 156, 177, 180,  198,  201, ...
  694, 698, 714, 722, 738, 742, 894, 898, 954, 970, 978, 990, 1014, 1022, ...
  ...
		

Crossrefs

Column k=1 gives A049363 (for n>1).
Last elements of rows give A062813.
Cf. A050278, A134640, A001563 (row lengths).

Programs

  • Mathematica
    dtn[ L_, base_ ] := Fold[ base*#1+#2&, 0, L ] f[ n_ ] := Map[ dtn[ #, n ]&, Select[ Permutations[ Range[ 0, n-1 ] ], First[ # ]>0& ] ] Flatten[ Join[ Table[ f[ i ], {i, 2, 5} ] ] ]

A051845 Triangle T(n,k) read by rows, in which row n gives all permutations of digits 1..n interpreted in base n+1.

Original entry on oeis.org

1, 5, 7, 27, 30, 39, 45, 54, 57, 194, 198, 214, 222, 238, 242, 294, 298, 334, 346, 358, 366, 414, 422, 434, 446, 482, 486, 538, 542, 558, 566, 582, 586, 1865, 1870, 1895, 1905, 1930, 1935, 2045, 2050, 2105, 2120, 2140, 2150, 2255, 2265, 2285, 2300, 2355, 2360
Offset: 1

Views

Author

Antti Karttunen, Dec 13 1999

Keywords

Comments

All terms in any odd row 2m+1 are divisible by 2m+1
The n-th row has n! elements.
Variant of permutational numbers with shifted digits 0->1->2->...->p+1 in p+1 positional system -- see A134750. - Artur Jasinski, Nov 08 2007
From Alexander R. Povolotsky, Oct 22 2022: (Start)
All terms in any even-indexed row n=2m are divisible by m, where m>0.
Row n starts with T(n,1) = ((n+1)^(n+1)-n^2-n-1)/n^2 = A023811(n+1).
Row n ends with T(n,n!) = ((n+1)^(n+1)*(n-1)+1)/n^2 = A051846(n).
(End)

Examples

			Triangle begins:
         k=1   k=2   k=3  ...
  n=1:     1;
  n=2      5,    7;
  n=3:    27,   30,  ...,   57;
  n=4:   194,  198,  214,  ..., 586;
  n=5:  1865, 1870, 1905, 1930, ..., 7465;
E.g., the permutations of digits 1, 2 and 3 in lexicographic order are 123, 132, 213, 231, 312, 321, which interpreted in base 4 give the third row of the table: 27, 30, 39, 45, 54, 57.
		

Crossrefs

Left edge = A023811, right edge = A051846.

Programs

  • Maple
    with(combinat,permute); compute_u_rows := proc(u) local a,n; a := []; for n from 1 to u do a := [op(a),op(map(list_in_base_b,permute(n),(n+1)))]; od; RETURN(a); end; list_in_base_b := proc(l,b) local k; add(l[nops(l)-k]*(b^k), k=0..(nops(l)-1)); end;
  • Mathematica
    a = {}; b = {}; Do[AppendTo[b, n]; w = Permutations[b]; Do[j = FromDigits[1 + w[[m]], n + 2]; AppendTo[a, j], {m, 1, Length[w]}], {n, 0, 5}]; a (* Artur Jasinski, Nov 08 2007 *)
  • Python
    from itertools import permutations
    def fd(d, b): return sum(di*b**i for i, di in enumerate(d[::-1]))
    def row(n): return [fd(d, n+1) for d in permutations(range(1, n+1))]
    print([an for r in range(1, 6) for an in row(r)]) # Michael S. Branicky, Oct 21 2022

A134750 Variant of permutational numbers with shifted digits 0->1->2->...->k+1 in k+1 positional system.

Original entry on oeis.org

1, 4, 5, 18, 20, 24, 28, 32, 34, 112, 115, 124, 130, 139, 142, 160, 163, 184, 193, 199, 205, 220, 226, 232, 241, 262, 265, 283, 286, 295, 301, 310, 313, 975, 979, 995, 1003, 1019, 1023, 1075, 1079, 1115, 1127, 1139, 1147, 1195, 1203, 1215, 1227, 1263, 1267
Offset: 1

Views

Author

Artur Jasinski, Nov 08 2007

Keywords

Comments

Variant of permutational numbers with shifted digits 0->1->2->...->k+1 in k+2 positional system see A051845

Crossrefs

Programs

  • Mathematica
    a = {}; b = {}; Do[AppendTo[b, n]; w = Permutations[b]; Do[j = FromDigits[1 + w[[m]], n + 1]; AppendTo[a, j], {m, 1, Length[w]}], {n, 0, 5}]; a (*Artur Jasinski*)

A062808 a(n) = Sum_{i=1..n} n^i * (n - i).

Original entry on oeis.org

0, 2, 15, 108, 970, 11190, 160125, 2739128, 54480996, 1234567890, 31384283755, 884241366756, 27342891567342, 920521275489998, 33512287529147385, 1311768467463790320, 54933923640889550728, 2450641333409472928554
Offset: 1

Views

Author

Olivier Gérard, Jun 23 2001

Keywords

Comments

Permutational numbers A134640 isomorphic with permutation matrix generators of cyclic groups, n-th root of unity matrices. - Artur Jasinski, Nov 07 2007

Crossrefs

Programs

  • Mathematica
    Sum[n^i*(n - i), {i, 1, n}]
    a = {}; b = {}; c = {}; Do[AppendTo[b, n]; c = b; AppendTo[c, 0]; AppendTo[a, FromDigits[c, n + 1]], {n, 1, 20}]; a (* Artur Jasinski, Nov 07 2007 *)
  • PARI
    a(n) = sum(i=1, n, n^i*(n-i)); \\ Michel Marcus, Mar 26 2019

Formula

a(n) = (n^(n+1)-n^3+n^2-n)/(n-1)^2 for n>1. - Dean Hickerson, Jun 26 2001

A134766 Primes among variant of permutational numbers A134750.

Original entry on oeis.org

5, 139, 163, 193, 199, 241, 283, 313, 1019, 1319, 1367, 1523, 1759, 2179, 2251, 2539, 2767, 2803, 2851, 2927, 3011, 3163, 3167, 3191, 3319, 3323, 3347, 3491, 3539, 3547, 3559, 3571, 3607, 3691, 11261, 11471, 11801, 11831, 12281, 12641, 13121, 13721
Offset: 1

Views

Author

Artur Jasinski, Nov 10 2007

Keywords

Comments

For indices where primes occurs in A134750, see A134767.

Crossrefs

Programs

  • Mathematica
    k = {}; a = {}; b = {}; Do[AppendTo[b, n]; w = Permutations[b]; Do[j = FromDigits[1 + w[[m]], n + 1]; AppendTo[a, j], {m, 1, Length[w]}], {n, 0, 6}]; Do[If[PrimeQ[a[[n]]], AppendTo[k, a[[n]]]], {n, 1, Length[a]}]; k

A134767 Indices where primes occur in variant of permutational numbers A134750.

Original entry on oeis.org

3, 14, 17, 19, 20, 25, 28, 33, 38, 52, 57, 63, 68, 89, 91, 100, 111, 113, 115, 119, 123, 124, 125, 127, 130, 131, 133, 141, 142, 143, 144, 145, 146, 151, 158, 164, 172, 174, 179, 185, 198, 209, 212, 256, 258, 275, 294, 299, 307, 309, 323, 326, 331, 332, 337
Offset: 1

Views

Author

Artur Jasinski, Nov 10 2007

Keywords

Comments

For primes in A134750 see A134766

Crossrefs

Programs

  • Mathematica
    k = {}; a = {}; b = {}; Do[AppendTo[b, n]; w = Permutations[b]; Do[j = FromDigits[1 + w[[m]], n + 1]; AppendTo[a, j], {m, 1, Length[w]}], {n, 0, 6}]; Do[If[PrimeQ[a[[n]]], AppendTo[k, n]], {n, 1, Length[a]}]; k

A134768 First differences of variant of permutational numbers A134750 .

Original entry on oeis.org

3, 1, 13, 2, 4, 4, 4, 2, 78, 3, 9, 6, 9, 3, 18, 3, 21, 9, 6, 6, 15, 6, 6, 9, 21, 3, 18, 3, 9, 6, 9, 3, 662, 4, 16, 8, 16, 4, 52, 4, 36, 12, 12, 8, 48, 8, 12, 12, 36, 4, 52, 4, 16, 8, 16, 4, 108, 4, 16, 8, 16, 4, 152, 4, 56, 16, 8, 12, 24, 8, 32, 16, 32, 8, 28, 4, 36, 12, 12, 8, 84, 4, 36, 12
Offset: 1

Views

Author

Artur Jasinski, Nov 10 2007

Keywords

Crossrefs

Programs

  • Mathematica
    k = {}; a = {}; b = {}; Do[AppendTo[b, n]; w = Permutations[b]; Do[j = FromDigits[1 + w[[m]], n + 1]; AppendTo[a, j], {m, 1, Length[w]}], {n, 0, 6}]; Do[AppendTo[k, a[[n + 1]] - a[[n]]], {n, 1, Length[a] - 1}]; k
Previous Showing 11-18 of 18 results.