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

A220695 Complement of A220655.

Original entry on oeis.org

1, 3, 4, 9, 10, 11, 12, 13, 14, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2012

Keywords

Crossrefs

Cf. A220696.

A219664 Repeating part of A220664: First differences of the numbers given as concatenation of permutations of (1,...,m) for sufficiently large m.

Original entry on oeis.org

9, 81, 18, 81, 9, 702, 9, 171, 27, 72, 18, 693, 18, 72, 27, 171, 9, 702, 9, 81, 18, 81, 9, 5913, 9, 81, 18, 81, 9, 1602, 9, 261, 36, 63, 27, 594, 18, 162, 36, 162, 18, 603, 9, 171, 27, 72, 18, 5814, 9, 171, 27, 72, 18, 603, 9, 261, 36, 63, 27, 1584, 27, 63, 36
Offset: 1

Views

Author

Antti Karttunen, Dec 18 2012

Keywords

Comments

First 5!-1 terms are identical to A107346, and the 9!-1 terms are identical to A209280. (Updated by M. F. Hasler, Jan 12 2013, Mar 03 2013)
Because of the self-similar nature of A220664, this sequence can be also constructed by picking appropriate terms from there with the auxiliary sequence A220655, cf. formula.
Similarly, differences between successive permutations of {1,2,...,k} in lexicographic order interpreted as decimal numbers, for any k=2..9, produce the first (k!)-1 terms of this sequence. But for k=10 the result is ill-defined, so we can consider the sequence finite, well-defined only for n=1..362879. [See however the following comment. - Editor's note]
In sequence A030299 it is clearly defined how it extends beyond index n = 1!+2!+...+9! = A007489(9), so the sequence A220664 of its first differences is well-defined up to infinity. (The "result" mentioned above is ill defined because the meaning of "interpreted" is not clear.) But the preceding comment is misleading by speaking of "self similar nature", and the sequence definition as "repeating part" is also misleading: If the sequence is defined to be of finite length 9!-1 (thus equal to A209280), then it is indeed infinitely often repeated as a subsequence (of consecutive terms) in A220664 (even when the latter was defined using concatenation for permutations of more than 9 elements, but then not as differences of the terms following 12345678910 where it was expected, but, e.g., as differences of the terms following 10123456789, etc.).
Since A030299 has been defined through a ("simpler") sum rather than concatenation, the nice mathematical properties of A220664, and even more this sequence A219664, persist beyond n=9!. - M. F. Hasler, Jan 12 2013

Examples

			The first four permutations of nine elements at A030299(A003422(9)..A003422(9)+3) (the terms A030299(46234..46237)) are: 123456789, 123456798, 123456879, 123456897. As 123456897-123456879 = 18, thus we have a(3) = 18.
We could compute the same value from any smaller set of permutations of at least three elements, for example, from the five element permutations used in A107346. In that case, the permutations A030299(A003422(5)..A003422(5)+3) (the terms A030299(34..37)) are: 12345, 12354, 12435, 12453, ... and we get the same result, a(3) = 12453-12435 = 18.
		

Crossrefs

Programs

  • PARI
    A219664(n)=for(k=2,n+1, k!>n || next; k=vecsort( vector( (#k=vector(k,j,10^j)~\10)!,i,numtoperm(#k,i)*k )); return(k[n+1]-k[n]))  \\ (It is of course more efficient to calculate a whole vector of the first k!-1 terms. Also, for n>9!, this might yield incorrect terms.) - M. F. Hasler, Jan 12 2013
  • Scheme
    (define (A219664 n) (A220664 (A220655 n)))
    

Formula

a(n) = A220664(A220655(n)).
a(n) = 9*A217626(n).

A220656 The positions of those permutations in A030298 where the first element is not fixed.

Original entry on oeis.org

3, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2012

Keywords

Comments

Correspondingly, gives the positions of those terms in A030299 whose first digit is not 1, as long as the decimal encoding system employed is valid.

Crossrefs

Complement: A220696. Cf. A081291.

Programs

Formula

a(n) = A003422(1+A084558(n)) + A000142(A084558(n)) + A212598(n).
a(n) = A220655(n)+1.

A231720 a(0)=1, after which, for any n uniquely written as du*u! + ... + d2*2! + d1*1! (each di in range 0..i), a(n) = (du+1)*(u+1)! + ... + (d2+1)*3! + (d1+1)*2! + 1; the natural numbers with their factorial base representation (A007623) shifted left one step and each digit incremented by one, converted back to decimal.

Original entry on oeis.org

1, 5, 15, 17, 21, 23, 57, 59, 63, 65, 69, 71, 81, 83, 87, 89, 93, 95, 105, 107, 111, 113, 117, 119, 273, 275, 279, 281, 285, 287, 297, 299, 303, 305, 309, 311, 321, 323, 327, 329, 333, 335, 345, 347, 351, 353, 357, 359, 393, 395, 399, 401, 405, 407, 417, 419
Offset: 0

Views

Author

Antti Karttunen, Nov 29 2013

Keywords

Examples

			1 has a factorial base representation A007623(1) = '1'. This shifted once left is '10', and when each digit is incremented by one, this will be '21', and 2*2! + 1*1! = 5 (also A007623(5) = '21'), thus a(1)=5.
2 has a factorial base representation '10'. This shifted once left is '100', and with each digit incremented, makes '211'. 2*3! + 1*2! + 1*1! = 15, thus a(2)=15.
		

Crossrefs

Subset of A227157. Cf. A007623, A153880, A220655.

Programs

  • Scheme
    ;; Standalone iterative implementation:
    (define (A231720 n) (let loop ((n n) (z 1) (i 2) (f 2)) (cond ((zero? n) z) (else (loop (quotient n i) (+ (* f (+ 1 (remainder n i))) z) (+ 1 i) (* f (+ i 1)))))))

Formula

a(0)=1, and for n>=1, a(n) = A220655(A153880(n)).
Showing 1-4 of 4 results.