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

A010879 Final digit of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
Offset: 0

Views

Author

Keywords

Comments

Also decimal expansion of 137174210/1111111111 = 0.1234567890123456789012345678901234... - Jason Earls, Mar 19 2001
In general the base k expansion of A062808(k)/A048861(k) (k>=2) will produce the numbers 0,1,2,...,k-1 repeated with period k, equivalent to the sequence n mod k. The k-digit number in base k 123...(k-1)0 (base k) expressed in decimal is A062808(k), whereas A048861(k) = k^k-1. In particular, A062808(10)/A048861(10)=1234567890/9999999999=137174210/1111111111.
a(n) = n^5 mod 10. - Zerinvary Lajos, Nov 04 2009

Crossrefs

Cf. A008959, A008960, A070514. - Doug Bell, Jun 15 2015
Partial sums: A130488. Other related sequences A130481, A130482, A130483, A130484, A130485, A130486, A130487.

Programs

Formula

a(n) = n mod 10.
Periodic with period 10.
From Hieronymus Fischer, May 31 and Jun 11 2007: (Start)
Complex representation: a(n) = 1/10*(1-r^n)*sum{1<=k<10, k*product{1<=m<10,m<>k, (1-r^(n-m))}} where r=exp(Pi/5*i) and i=sqrt(-1).
Trigonometric representation: a(n) = (256/5)^2*(sin(n*Pi/10))^2 * sum{1<=k<10, k*product{1<=m<10,m<>k, (sin((n-m)*Pi/10))^2}}.
G.f.: g(x) = (Sum_{k=1..9} k*x^k)/(1-x^10) = -x*(1 +2*x +3*x^2 +4*x^3 +5*x^4 +6*x^5 +7*x^6 +8*x^7 +9*x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ).
Also: g(x) = x*(9*x^10-10*x^9+1)/((1-x^10)*(1-x)^2).
a(n) = n mod 2+2*(floor(n/2)mod 5) = A000035(n) + 2*A010874(A004526(n)).
Also: a(n) = n mod 5+5*(floor(n/5)mod 2) = A010874(n)+5*A000035(A002266(n)). (End)
a(n) = 10*{n/10}, where {x} means fractional part of x. - Enrique Pérez Herrero, Jul 30 2009
a(n) = n - 10*A059995(n). - Reinhard Zumkeller, Jul 26 2011
a(n) = n^k mod 10, for k > 0, where k mod 4 = 1. - Doug Bell, Jun 15 2015

Extensions

Formula section edited for better readability by Hieronymus Fischer, Jun 13 2012

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
Showing 1-2 of 2 results.