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.

Showing 1-6 of 6 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

A134644 Even permutational numbers A134640.

Original entry on oeis.org

0, 2, 30, 54, 78, 108, 114, 120, 156, 180, 198, 210, 216, 228, 194, 198, 214, 222, 238, 242, 294, 298, 334, 346, 358, 366, 414, 422, 434, 446, 482, 486, 538, 542, 558, 566, 582, 586, 694, 698, 714, 722, 738, 742, 894, 898, 954, 970, 978, 990, 1014, 1022, 1054
Offset: 1

Views

Author

Artur Jasinski, Nov 05 2007

Keywords

Comments

Odd permutational numbers see A134643

Crossrefs

Programs

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

A134741 Permutational numbers A134640 which are squares.

Original entry on oeis.org

0, 1, 225, 2500, 7225, 38025, 106929, 314721, 622521, 751689, 1750329, 3111696, 6002500, 7568001, 8168164, 8282884, 10323369, 11682724, 12517444, 23367556, 23483716, 25623844, 28536964, 33292900, 39513796, 61058596, 73513476, 74545956, 94517284, 105144516, 112572100, 112656996, 132756484
Offset: 1

Views

Author

Artur Jasinski, Nov 07 2007

Keywords

Crossrefs

Programs

  • Maple
    N:= 10^10: # for terms <= N
    extend:= proc(x, N, S, b, k)
      local i, R;
      R:= NULL;
      for i in S while x + i*b^k <= N do
        if k = 0 then
           if issqr(x+i*b^k) then R:= R, x+i*b^k fi
        else
           R:= R, procname(x+i*b^k, N, subs(i=NULL, S), b, k-1)
        fi
      od;
      R
    end proc:
    f:= (b, N) -> extend(0, N, [$0..(b-1)], b, b-1):
    R:= 0:
    for b from 2 while b^(b-2) < N do
      R:= R, f(b, N);
    od:
    sort([R]); # Robert Israel, Sep 04 2020
  • Mathematica
    a = {}; b = {}; Do[AppendTo[b, n]; w = Permutations[b]; Do[j = FromDigits[w[[m]], n + 1]; If[IntegerQ[j^(1/2)], AppendTo[a, j]], {m, 1, Length[w]}], {n, 0, 7}]; a

Formula

a(n) = A134742(n)^2.

Extensions

Corrected and more terms from Robert Israel, Sep 04 2020

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

A134742 Numbers whose square is a permutational number A134640.

Original entry on oeis.org

0, 1, 15, 50, 85, 195, 327, 561, 789, 867, 1323, 1764, 2450, 2751, 2858, 2878, 3213, 3418, 3538, 4834, 4846, 5062, 5342, 5770, 6286, 7814, 8574, 8634, 9722, 10254, 10610, 10614, 11522, 11702, 11826, 12363, 12543, 13490, 14246, 14502, 14538, 14676, 14818, 14902, 15186, 15434, 15681, 15874, 15963
Offset: 1

Views

Author

Artur Jasinski, Nov 07 2007

Keywords

Crossrefs

Programs

  • Maple
    N:= 10^5: # for terms <= N
    extend:= proc(x,N,S,b,k)
      local i,R;
      R:= NULL;
      for i in S while x + i*b^k <= N^2 do
        if k = 0 then
           if issqr(x+i*b^k) then R:= R, sqrt(x+i*b^k) fi
        else
           R:= R, procname(x+i*b^k,N,subs(i=NULL,S),b,k-1)
        fi
      od;
      R
    end proc:
    f:= (b,N) -> extend(0,N,[$0..(b-1)],b,b-1):
    R:= 0:
    for b from 2 while b^(b-2) < N^2 do
      R:= R, f(b,N);
    od:
    sort([R]); # Robert Israel, Sep 04 2020
  • Mathematica
    a = {}; b = {}; Do[AppendTo[b, n]; w =Permutations[b]; Do[j = FromDigits[w[[m]], n + 1]; If[IntegerQ[j^(1/2)], AppendTo[a, j]], {m, 1, Length[w]}], {n, 0, 7}]; Sqrt[a]

Formula

a(n) = sqrt(A134741(n)).

Extensions

Corrected and more terms from Robert Israel, Sep 04 2020

A134745 Numbers which are not permutational numbers A134640.

Original entry on oeis.org

3, 4, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Artur Jasinski, Nov 07 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; b = {}; Do[AppendTo[b, n]; w = Permutations[b]; Do[j = FromDigits[w[[m]], n + 1]; AppendTo[a, j], {m, 1, Length[w]}], {n, 0, 5}]; c = Table[n, {n, 0, 44790}]; k = Complement[c, a] (*Artur Jasinski*)
Showing 1-6 of 6 results.