login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099767 Number of n-digit palindromes in base n. 1
1, 6, 12, 100, 180, 2058, 3584, 52488, 90000, 1610510, 2737152, 57921708, 97883968, 2392031250, 4026531840, 111612119056, 187339329792, 5808378560022, 9728000000000, 333597619564020, 557758378619904, 20961814674106394, 34998666292887552, 1430511474609375000 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

LINKS

G. C. Greubel, Table of n, a(n) for n = 2..700

FORMULA

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

EXAMPLE

a(3) = 6 because there are 6 3-digit palindromes in base 3, namely 101, 111, 121, 202, 212, 222.

MAPLE

seq((n-1)*n^(floor((n+1)/2) -1), n=2..30); # G. C. Greubel, Sep 03 2019

MATHEMATICA

(n-1)*n^(Floor[(n+1)/2] -1) /. n -> Range[2, 30]

PROG

(PARI) vector(30, n, n*(n+1)^((n+2)\2 -1) ) \\ G. C. Greubel, Sep 03 2019

(MAGMA) [(n-1)*n^(Floor((n+1)/2) - 1): n in [2..30]]; // G. C. Greubel, Sep 03 2019

(Sage) [(n-1)*n^(floor((n+1)/2) - 1) for n in (2..30)] # G. C. Greubel, Sep 03 2019

(GAP) List([2..30], n-> (n-1)*n^(Int((n+1)/2) - 1)); # G. C. Greubel, Sep 03 2019

CROSSREFS

Sequence in context: A181597 A002898 A003613 * A191462 A340060 A080450

Adjacent sequences:  A099764 A099765 A099766 * A099768 A099769 A099770

KEYWORD

easy,nonn,base

AUTHOR

Anonymous, Nov 11 2004

EXTENSIONS

Terms a(21) onward added by G. C. Greubel, Sep 03 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 06:56 EDT 2021. Contains 346273 sequences. (Running on oeis4.)