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.

A124798 Sequence of digits (least significant digit first) of A124797 (sums of cyclic permutations of 1...n written in base n+1).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 07 2006

Keywords

Comments

Sequence A083956 becomes "unnatural" for n>9. It is easily seen that for n=2k, the sum of permutations A124797(n) is {k:n}0 in base n+1 where {k:n} means n times the digit k; while for n=2k+1 (>1), the sum is k{n:2k}{k+1} (again in base n+1). In particular, this number has n+1 digits (for n>1), such that the digits for A124797(n) start at place n(n+1)/2-1 (for n>1).

Examples

			a(1)=1, the sum of cyclic permutations of 1;
a(2..4)=0,1,1 since 12 + 21 = 110 in base 3;
a(5..8)=2,3,3,1 since 123 + 231 + 312 = 1332 in base 4;
a(9..13)=0,2,2,2,2 since 1234 + 2341 + 3412 + 4123 = 22220 in base 5.
		

Crossrefs

Programs

  • Maple
    A124797 := n->(n+1)/2*((n+1)^n-1): map(op, [ 'convert(A124797(i),base,i+1)' $ i=1..20 ]);

A214698 a(n) = (n^n - n^2)/2.

Original entry on oeis.org

0, 0, 9, 120, 1550, 23310, 411747, 8388576, 193710204, 4999999950, 142655835245, 4458050224056, 151437553296042, 5556003412778910, 218946945190429575, 9223372036854775680, 413620130943168381944, 19673204037648268787550, 989209827830156794561809, 52428799999999999999999800
Offset: 1

Views

Author

Alex Ratushnyak, Jul 26 2012

Keywords

Examples

			a(3) = (27 - 9)/2 = 9.
		

Crossrefs

Cf. A124797 is essentially equal to (n^n-n)/2.

Programs

  • Magma
    [(n^n -n^2)/2: n in [1..30]]; // G. C. Greubel, Jan 08 2024
    
  • Maple
    A214698:= proc(n)
        (n^n-n^2)/2 ;
    end proc: # R. J. Mathar, Aug 07 2012
  • Mathematica
    Table[(n^n-n^2)/2,{n,30}] (* Harvey P. Dale, Dec 25 2022 *)
  • Python
    for n in range(1, 22):
        print((n**n - n*n)//2)
    
  • SageMath
    [(n^n -n^2)/2 for n in range(1,31)] # G. C. Greubel, Jan 08 2024

Formula

a(n) = A214647(n) - n^2 = A117694(n) - A000217(n).
E.g.f.: (-1/2)*(lambertW(-x)/(1 + lambertW(-x)) + x*(x+1)*exp(x)). - G. C. Greubel, Jan 08 2024
Showing 1-2 of 2 results.