login
A123668
Smallest pandigital palindrome in base n, with a(1) = 1.
1
1, 5, 100, 4833, 434176, 64896625, 14555276100, 4566338422401, 1907710008707584, 1023456789876543201, 685593403921020830500, 560806213771094855054689, 550049712286417194431060352
OFFSET
1,2
LINKS
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).
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 *)
PROG
(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
CROSSREFS
Sequence in context: A369535 A078534 A141120 * A336427 A197200 A090436
KEYWORD
base,nonn
AUTHOR
STATUS
approved