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.

A178486 (A178476(n)-3)/9.

Original entry on oeis.org

13717, 13718, 13727, 13729, 13738, 13739, 13817, 13818, 13837, 13840, 13848, 13850, 13927, 13929, 13937, 13940, 13959, 13960, 14038, 14039, 14048, 14050, 14059, 14060, 14717, 14718, 14727, 14729, 14738, 14739, 14917, 14918, 14947, 14951, 14958, 14961
Offset: 1

Views

Author

M. F. Hasler, May 28 2010

Keywords

Comments

The sequence is motivated by the fact that numbers whose decimal expansion is a permutation of 123456, are all of the form 9k+3.
There are 6!=720 terms in this finite sequence.

Crossrefs

Programs

  • PARI
    forstep( m=123456,654321/*or less*/,9, is_A178476(m) & print1(m\9",")) /*cf. A178476*/

Formula

a(n) + a(6!+1-n) = 86419.
a(n) == 0, 1, 2, 7, 8 or 9 (mod 10).

A209280 First difference of A050289 = numbers whose digits are a permutation of (1,...,9).

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, 261, 9
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2013

Keywords

Comments

This sequence is the natural extension of A107346 (and others, see below) from 5!-1 to 9!-1 terms, which is the natural (since maximal) length, given that OEIS sequence data are stored as decimal numbers. On the other hand, it is quite different from A219664 in many aspects, not only for the reason that the other sequence is infinite and therefore differs from this one in all terms beyond n = 9!-1.
The sequence is finite, with 9!-1 terms, and symmetric: a(n)=a(9!-n).
All terms are multiples of 9, cf. formula.
The subsequence of the first n!-1 terms (n=2,...,9) yields the first differences of the sequence of numbers whose digits are a permutation of (1,...,n):
The first 8!-1 terms yield the first differences of A178478: numbers whose digits are a permutation of 12345678.
The first 7!-1 terms yield the first differences of A178477: numbers whose digits are a permutation of 1234567.
The first 6!-1 terms yield the first differences of A178476: numbers whose digits are a permutation of 123456.
The first 5!-1 terms yield A107346, the first differences of A178475: numbers whose digits are a permutation of 12345.

Examples

			The same initial terms are obtained for the permutations of any set of the form {1,...,m}, e.g., {1,2,3} or {1,...,9}: In the first case we have P = (123,132,213,231,312,321) and P(4)-P(3) = 231 - 213 = 18 = a(3), and in the latter case P(4)-P(3) = 123456897 - 123456879 = 18, again. - _M. F. Hasler_, Jan 12 2013
		

Crossrefs

Programs

  • Mathematica
    Take[Differences[Sort[FromDigits/@Permutations[Range[9]]]],70] (* Harvey P. Dale, Mar 31 2018 *)
  • PARI
    A209280_list(N=5)={my(v=vector(N,i,10^(N-i))~); v=vecsort(vector(N!,k,numtoperm(N,k)*v)); vecextract(v,"^1")-vecextract(v,"^-1")} \\ return the N!-1 first terms as a vector
    
  • PARI
    A209280(n)={if(a209280=='a209280 || #a209280A209280_list(A090529(n+1)));a209280[n]}

Formula

a(n) = A219664(n) = 9*A217626(n) (for n < 9!). - M. F. Hasler, Jan 12 2013
a(n) = a(m!-n) for any m < 10 such that n < m!.

A178475 Permutations of 12345: Numbers having each of the decimal digits 1,...,5 exactly once, and no other digit.

Original entry on oeis.org

12345, 12354, 12435, 12453, 12534, 12543, 13245, 13254, 13425, 13452, 13524, 13542, 14235, 14253, 14325, 14352, 14523, 14532, 15234, 15243, 15324, 15342, 15423, 15432, 21345, 21354, 21435, 21453, 21534, 21543, 23145, 23154, 23415
Offset: 1

Views

Author

M. F. Hasler, May 28 2010

Keywords

Comments

There are 5! = 120 terms in this finite subsequence of A030299.
It would be interesting to conceive simple and/or efficient functions which yield (a) the n-th term of this sequence: f(n) = a(n), (b) for a given term, the subsequent one: f(a(n)) = a(1 + (n mod 5!)).
From Nathaniel Johnston, May 19 2011: (Start)
Individual terms a(n) can be computed efficiently via the following procedure: Define b(n,k) = 1 + floor(((n-1) mod (k+1)!)/k!) for k = 1, 2, 3, 4. The first digit of a(n) is b(n,4). The second digit of a(n) is the b(n,3)-th number not already used. The third digit of a(n) is the b(n,2)-th number not already used. The fourth digit of a(n) is the b(n,1)-th number not already used, and the final digit of a(n) is the only digit remaining. This procedure generalizes in the obvious way for related sequences such as A178476.
For example, if n = 38 then we compute b(38,1) = 2, b(38,2) = 1, b(38,3) = 3, b(38,4) = 2. Thus a(38) = 24153 (2, followed by the 3rd digit not yet used, followed by the 1st digit not yet used, followed by the 2nd digit not yet used, followed by the last remaining digit).
(End)

Crossrefs

Programs

  • Mathematica
    FromDigits/@Permutations[Range[5]] (* Harvey P. Dale, Jan 19 2019 *)
  • PARI
    A178475(n)={my(b=vector(4,k,1+(n-1)%(k+1)!\k!),t=b[4],d=vector(4,i,i+(i>=t)));for(i=1,3,t=10*t+d[b[4-i]];d=vecextract(d,Str("^"b[4-i])));t*10+d[1]} \\ - M. F. Hasler (following N. Johnston's comment), Jan 10 2012
    
  • PARI
    v=vector(5,i,10^(i-1))~; A178475=vecsort(vector(5!,i,numtoperm(5,i)*v))
    is_A178475(x)={ vecsort(Vecsmall(Str(x)))==Vecsmall("12345") }
    forstep( m=12345,54321,9, is_A178475(m) & print1(m","))

Formula

a(n) + a(5! + 1 - n) = 66666.
floor( a(n) / 10^4 ) = ceiling( n / 4! ).
a(n) = A030299(n+33).
a(n) == 6 (mod 9).
a(n) = 6 + 9*A178485(n).

A178477 Permutations of 1234567: Numbers having each of the decimal digits 1,...,7 exactly once, and no other digit.

Original entry on oeis.org

1234567, 1234576, 1234657, 1234675, 1234756, 1234765, 1235467, 1235476, 1235647, 1235674, 1235746, 1235764, 1236457, 1236475, 1236547, 1236574, 1236745, 1236754, 1237456, 1237465, 1237546, 1237564, 1237645, 1237654
Offset: 1

Views

Author

M. F. Hasler, Oct 09 2010

Keywords

Comments

It would be nice to have a simple explicit formula for the n-th term.
Contains A000142(7) = 5040 terms. - R. J. Mathar, Apr 08 2011
An efficient procedure for generating the n-th term of this sequence can be found at A178475. - Nathaniel Johnston, May 19 2011

Crossrefs

Programs

  • Mathematica
    FromDigits/@Take[Permutations[Range[7]],50] (* Harvey P. Dale, Nov 11 2012 *)
  • PARI
    is_A178477(x)= { vecsort(Vec(Str(x)))==Vec("1234567") }
Showing 1-4 of 4 results.