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.

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

Original entry on oeis.org

5, 194, 14619, 1831444, 348288905, 94197694758, 34466324363639, 16416600747716168, 9876543210123456789, 7326247444821284733610, 6569987372181208872192659, 7007407167541356868004228892
Offset: 2

Views

Author

Reinhard Zumkeller, Mar 04 2002

Keywords

Comments

a(n) = A062813(n)*n^(n-1) + A023811(n).
a(n) is a palindrome in base-n representation for all n.

Examples

			a(2) = 5 = 101_2;
a(8) = 34466324363639 = 765432101234567_8;
a(10) = 9876543210123456789;
a(16) = 21173125052858393282329502187520773615 = FEDC...876543210123456789ABCDEF_16.
		

Crossrefs

Programs

  • Python
    def A068793(n): return ((m:=n**n)*(m*(n-2)+2)-n**2+n-1)//(n-1)**2 # Chai Wah Wu, Mar 18 2024

Formula

a(n) = (n^n*(n^n*(n-2)+2)-n^2+n-1)/(n-1)^2.

A123668 Smallest pandigital palindrome in base n, with a(1) = 1.

Original entry on oeis.org

1, 5, 100, 4833, 434176, 64896625, 14555276100, 4566338422401, 1907710008707584, 1023456789876543201, 685593403921020830500, 560806213771094855054689, 550049712286417194431060352
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1, 5}, Table[1 + n^(2 n - 2) + (n - 1) n^(n - 1) + Sum[ i*(n^(2 n - 2 - i) + n^i), {i, 2, n - 2}], {n, 3, 50}]] (* G. C. Greubel, Oct 26 2017 *)
  • PARI
    for(n=1,50, print1(if(n==1,1, if(n==2,5, 1 + n^(2*n - 2) + (n - 1)* n^(n - 1) + sum(i=2,n-2, i*(n^(2*n - 2 - i) + n^i)))), ", ")) \\ G. C. Greubel, Oct 26 2017
    
  • Python
    def A123668(n): return n*((n**(n-1)-1)//(n-1))**2 + (n-1)*(n**(2*n-3)-1) if n>2 else 4*n-3 # Chai Wah Wu, Mar 18 2024

Formula

For n>2, a(n) = n*A068792(n) + (n-1)(n^(2n-3) - 1).
For n>2, a(n) = 1 + n^(2n-2) + (n-1)n^(n-1) + Sum_{i=2..(n-2)} i*(n^(2n-2-i)+n^i).
Showing 1-2 of 2 results.