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

A219995 Decimal expansion of Sum_{n >= 1, b(n) != 1} 1/b(n)^n, where b(n) = A217626(n).

Original entry on oeis.org

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

Views

Author

R. J. Cano, Dec 02 2012

Keywords

Comments

Decimal expansion of the limit to which tends the difference between the series for 1/A217626(x) and the Gamma function evaluated for M, where 2R. J. Cano, May 25 2017

Examples

			0.138159806610613873514870900106308683044855277244...
		

Crossrefs

Programs

Extensions

Edited by N. J. A. Sloane, Dec 03 2012
Offset corrected by Rick L. Shepherd, Jan 14 2014

A030299 Decimal representation of permutations of lengths 1, 2, 3, ... arranged lexicographically.

Original entry on oeis.org

1, 12, 21, 123, 132, 213, 231, 312, 321, 1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142, 3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321, 12345, 12354, 12435, 12453, 12534, 12543, 13245, 13254, 13425
Offset: 1

Views

Author

Keywords

Comments

This is a list of the permutations in "one-line" notation (cf. Dixon and Mortimer, p. 2). The i-th element of the string is the image of i under the permutation. For example 231 is the permutation that sends 1 to 2, 2 to 3, and 3 to 1. - N. J. A. Sloane, Apr 12 2014
Precise definition of the term "Decimal representation" (required for indices n>409113): Numbers N(s) = Sum_{i=1..m} s(i)*10^(m-i), where s runs over the permutations of (1,...,m), and m=1,2,3,.... This also defines the "lexicographical" order: Obviously 21 comes before 123, etc. The lexicographical order of the permutations, for given m, is the same as the natural order of the numbers N(s). - M. F. Hasler, Jan 28 2013
An alternate variant, using concatenation of the permutations, is very clumsy once the length exceeds 9. For example, after 987654321 (= A030299(409113), where 409113 = A007489(9)) we would get 12345678910, 12345678109, ... In A030298 this problem has been avoided by listing the elements of permutations as separate terms. [Edited by M. F. Hasler, Jan 28 2013]
Sequence A051845 is a base-independent version of this sequence: Permutations of 1...m are considered as numbers written in base m+1. - M. F. Hasler, Jan 28 2013

References

  • John D. Dixon and Brian Mortimer, Permutation groups. Graduate Texts in Mathematics, 163. Springer-Verlag, New York, 1996. xii+346 pp. ISBN: 0-387-94599-7 MR1409812 (98m:20003).

Crossrefs

A007489(n) gives the position (index) of the term corresponding to last permutation of n elements: (n,n-1,...,1).
The first differences A220664 has interesting fractal structure, see A219664 and A217626.
Cf. also A030298, A055089, A060117, A181073, A352991 (by concatenation).
See A240763 for preferential arrangements.

Programs

  • Maple
    seq(seq(add(s[i]*10^(m-i),i=1..m),s=combinat:-permute([$1..m])),m=1..5); # Robert Israel, Oct 14 2015
  • Mathematica
    Flatten @ Table[FromDigits /@ Permutations[Table[i,{i,n}]],{n,9}] (* For first 409113 terms; Zak Seidov, Oct 03 2015 *)
  • PARI
    is_A030299(n)={ (n>1234567890 & print("maybe")) || vecsort(digits(n))==vector(#Str(n),i,i) } \\ /* use digits(n)=eval(Vec(Str(n))) in older versions lacking this function */ \\ M. F. Hasler, Dec 12 2012
    (MIT/GNU Scheme)
    ;; Antti Karttunen, Dec 18 2012
    ;; Requires also code from A030298 and A055089:
    (define (A030299 n) (vector->base-k (A030298permvec (A084556 n) (A220660 n)) 10))
    (define (vector->base-k vec k) (let loop ((i 0) (s 0)) (cond ((= (vector-length vec) i) s) ((>= (vector-ref vec i) k) (error (format #f "Cannot interpret vector ~a in base ~a!" vec k))) (else (loop (+ i 1) (+ (* k s) (vector-ref vec i)))))))
    
  • Python
    from itertools import permutations
    def pmap(s, m): return sum(s[i-1]*10**(m-i) for i in range(1, len(s)+1))
    def agen():
      m = 1
      while True:
        for s in permutations(range(1, m+1)): yield pmap(s, m)
        m += 1
    def aupton(terms):
      alst, g = [], agen()
      while len(alst) < terms: alst += [next(g)]
      return alst
    print(aupton(42)) # Michael S. Branicky, Jan 12 2021

Extensions

Edited by N. J. A. Sloane, Feb 23 2010

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).

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!.

A215940 Difference between the n-th and the first (identity) permutation of (0,...,m-1), interpreted as a decimal number, divided by 9 (for any m for which 10! >= m! >= n).

Original entry on oeis.org

0, 1, 10, 12, 21, 22, 100, 101, 120, 123, 131, 133, 210, 212, 220, 223, 242, 243, 321, 322, 331, 333, 342, 343, 1000, 1001, 1010, 1012, 1021, 1022, 1200, 1201, 1230, 1234, 1241, 1244, 1310, 1312, 1330, 1334, 1352, 1354, 1421, 1422, 1441, 1444, 1452, 1454, 2100
Offset: 1

Views

Author

R. J. Cano, Sep 21 2012

Keywords

Comments

Original definition: "Quotients of the polynomial remainder theorem for Diophantine equations among permutations."
The set built from the first terms of this sequence {0, 1, 10, 12, 21, 22, ....} contains the general solutions for a class of Diophantine linear equations among permutations, if one takes into account the unlimited number of distinct bases where these may be read.
From M. F. Hasler, Jan 12 2013, edited by R. J. Cano, May 08 2017: (Start)
Let P be the sequence of permutations of (0,...,m-1) interpreted as decimal numbers, P(n) = Sum_{i=1..m} 10^(m-i)*s(i) where s=(s(1),...,s(m)) is the n-th permutation (in lexicographical order), n <= m!. Then the difference P(n)-P(1) is independent of the choice of m, and divisible by 9. (Since 10 == 1 (mod 9), the numbers P(n) are all congruent (mod 9) to the sum s(1)+...+s(m).) This yields well-defined terms a(n)=(P(n)-P(1))/9.
For n>10!, P(n) will no longer be the concatenation of the "digits" (some of which will exceed 9). The pattern present in the decimal representation of the first terms will also be lost since there will be digits as large as d+1.
Note that the same a(n) is obtained independently of the chosen base b, provided that (i) 10 and 9 in the above are replaced with b and b-1, (ii) the result is (and can be) written in base b. (This implies the restriction to terms which can be written using the digits 0-9 to which the OEIS is limited.) See EXAMPLES for an illustration. (End)
We have P(n)-P(1)=a(n)*g(n), with g(n) = 9 = 10-1. Considering this and P(n) as polynomials in x=10, one can see an analogy with the polynomial remainder theorem. [Given as "formula" by R. J. Cano, rephrased by M. F. Hasler, Jan 12 2013]
Contribution by R. J. Cano, Feb 09 2013, (Start)
The maximum of the first m! terms of this sequence is given in base R by the explicit formula (please see A211869): max(m,R)=Sum_{k=1..m} k*(m-k)*R^(m-k-1);
If the first m! terms of this sequence were computed reading the permutations in base A033638(m), dividing their differences by A033638(m)-1, the resulting quotients would be written in the same way (with the same digits) in every base > A033638(m).
(End)
From R. J. Cano, Apr 29 2016, (Start)
Although in the sequence name it reads: "permutation of (0,...,m-1)", the most general statement that could replace it is: "permutation of any m-tuple of integers all of them in arithmetic progression", obtaining a multiple of this sequence, lambda*a(n), where lambda is the common difference for the progression. It works in such way because only the differences is what matters here.
Given x>1 and k>=0, if a polynomial G(x) of degree k is divided by x-1 then the remainder will be the sum of all the coefficients in G. Let us consider the case in which those coefficients are the differences among the letters ("digits") of two permutations for the same set of letters (0..x-1): The sum of all those differences must vanish. This explains how the difference between two of such permutations expressed in base x is 0 mod x-1, particularly why differences for pairs of permutations are divisible by 9.
Another way of introducing this sequence takes advantage of the fact that for n>1, n! is even. Consider for n>1 to obtain only the first n! terms. This can be done by subtracting the last permutation from the first, the penultimate permutation from the second, and so on by following the pattern (P(k)-P(n!-k+1))/9 with 1<=k<=n!. Such procedure generates an antisymmetric sequence f(k) from which a(k)=(f(k)+f(n!))/2. This partially explains why A217626 is symmetric. Also a base-independent treatment is possible using linear algebra: Column vectors and the strictly lower triangular matrix instead of the division by (r-1) where r is the base (and r=10 here for this sequence). This approach leads one to conclude that terms in this sequence are the differences between pairs of vectors made from the first n-1 partial sums of letters ("digits") taken from permutations for n consecutive letters, when components in these vectors are viewed as coefficients for a power series in r=10.
(End)

Examples

			From _M. F. Hasler_, Jan 12 2013, edited by _R. J. Cano_, May 09 2017: (Start)
The permutations of {0,1,2}, read as numbers, are {12, 21, 102, 120, 201, 210}. Subtracting the first one (12) from each of these numbers yields the differences {0, 9, 90, 108, 189, 198}. These are all multiples of 9, see comment and links. Dividing the differences by 9 yields {0, 1, 10, 12, 21, 22}, which are by definition the first six terms of this sequence.
Using all permutations of 0123 would yield 4!=24 terms, where the first 6 would be identical to those above. For n>10! we must consider permutations of (0,...,m-1) with m>10. These are no longer valid digits in base 10, and the numbers P(n) as defined in the comment are no longer equal to the concatenation. However, the first 10! terms obtained as (P(n)-P(1))/9, are still the same as for m=10;
In order to illustrate that the result is independent of the base chosen to make the calculation, let us consider permutations of 012 in base 3. The 3rd resp. 5th term ((102-012)/9=10 resp. (201-012)/9=21) would be ((1-0)*3^2+(0-1)*3+(2-2)*1)/(3-1) = 3 = 10[3], resp. ((2-0)*3^2+(0-1)*3+(1-2)*1)/(3-1) = 7 = 21[3]. The same terms would also be "10" and "21" if the calculation were made in base b=11. In that base, with digit "A" having the value b-1, we have (1023456789A - 0123456789A)/A = 0A000000000[11], (2013456789A - 0123456789A)/A = 02100000000[11], and (0A123456789 - 0123456789A)/A = 0A987654321[11] (the analog of (40123[5]-01234[5])/4[5] = 04321[5]). (End)
		

Crossrefs

Programs

  • C
    // See links.
    
  • Maple
    N:= 100: # to get a(1)..a(N)
    for M from 3 while M! <= N do od:
    p0:= [$1..M]: p:= p0: A[1]:= 0:
    for n from 2 to N do
      p:= combinat:-nextperm(p);
      d:= p - p0;
      A[n]:= add(10^(i-1)*d[-i],i=1..M)/9;
    od:
    seq(A[i],i=1..N); # Robert Israel, Apr 19 2017
  • Mathematica
    maxm = 5; Table[dd = FromDigits /@ Permutations[Range[m]]; (Drop[dd, If[m == 1, 0, (m - 1)!]] - First[dd])/9, {m, 1, maxm}] // Flatten (* Jean-François Alcover, Apr 25 2013 *)
  • PARI
    A215940(n)=for(k=2, n+1, k!M. F. Hasler, Jan 12 2013
    
  • PARI
    first_n_factorial_terms(n)={my(u=n!);my(x=numtoperm(n,0),y,z=vector(u),i:small);i=0;for(j=0,u-1,y=numtoperm(n,j)-x;z[i++]=fromdigits(vector(#x-1,k,vecsum(y[1..k]))));z} \\ R. J. Cano, Apr 19 2017

Formula

a(n) = Sum_{k=1..n-1} A217626(k).
a(n) = (A050289(n)-A050289(1))/9, for n <= 9!. - M. F. Hasler, Jan 12 2013

Extensions

Edited by M. F. Hasler, Jan 12 2013
Minor edits by N. J. A. Sloane, Feb 19 2013

A220664 First differences of A030299.

Original entry on oeis.org

11, 9, 102, 9, 81, 18, 81, 9, 913, 9, 81, 18, 81, 9, 702, 9, 171, 27, 72, 18, 693, 18, 72, 27, 171, 9, 702, 9, 81, 18, 81, 9, 8024, 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
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2012

Keywords

Comments

From M. F. Hasler, Jan 12 2013: (Start)
Note [updated Mar 03 2013]: The definition of sequence A030299 has been slightly modified in Jan. 2013, and as a consequence the following properties remain valid beyond the first A007489(9)-1 = 409112 terms, which had not been the case before, when A030299 had been defined through concatenation of the lexicographically ordered permutations, which in case of elements >= 10 broke up the nice mathematical properties (esp. of the sequence A219664 = 9*A217626 cited below).
This sequence taken modulo 9 is zero except (possibly) at indices where a run of permutations ends in A030299. (These indices are given by A007489(n), n>0.) There it equals (mod 9) the "n" of the following run. E.g., a(1)=2 (mod 9), and A030299(1+1)=12 is the start of the run for n=2; a(3)=3 (mod 9) and A030299(3+1)=123 is the start of the run for n=3, a(9)=4 (mod 9) and A030299(9+1)=1234 is the start of the run for n=4, etc.
The subsequence between these indices (A007489(n)+1,...,A007489(n+1)-1), always starts with the same terms, listed in A219664 = 9*A217626 (= A209280 = A107346 where the latter are defined). (End)

Examples

			A030299 starts (1, 12, 21, 123, 132, 213, 231, 312, ...), the first differences thereof yield (11, 9, 102, 9, 81, 18, 81, ...).
		

Crossrefs

The repeating part is given by A219664, equal to A107346 for indices < 5!.

Programs

  • Maple
    (l-> seq(l[j]-l[j-1], j=2..nops(l)))([seq(map(x-> parse(cat(x[])),
         combinat[permute](n))[], n=0..5)])[];  # Alois P. Heinz, Nov 09 2021
  • PARI
    {A030299=concat( vector( 5,k, vecsort( vector( (#k=vector(k, j, 10^j)~\10)!, i, numtoperm(#k, i-1)*k )))); A220664=vecextract(A030299,"^1")-vecextract(A030299,"^-1")} \\ M. F. Hasler, Jan 12 2013
    
  • Python
    from itertools import permutations
    def pmap(s, m): return sum(s[i-1]*10**(m-i) for i in range(1, len(s)+1))
    def agen():
        m = 1
        while True:
            for s in permutations(range(1, m+1)): yield pmap(s, m)
            m += 1
    def aupton(terms):
        alst, g = [], agen()
        t = next(g)
        while len(alst) < terms:
            t, prevt = next(g), t
            alst += [t - prevt]
        return alst
    print(aupton(65)) # Michael S. Branicky, Nov 09 2021
  • Scheme
    (define (A220664 n) (- (A030299 (+ 1 n)) (A030299 n)))
    

Formula

a(n) = A030299(n+1) - A030299(n).
a(n) = A219664(n-A007489(k)), for A007489(k) < n < A007489(k+1). - M. F. Hasler, Jan 13 2013

A243106 a(n) = Sum_{k=1..n} (-1)^isprime(k)*10^k.

Original entry on oeis.org

10, -90, -1090, 8910, -91090, 908910, -9091090, 90908910, 1090908910, 11090908910, -88909091090, 911090908910, -9088909091090, 90911090908910, 1090911090908910, 11090911090908910, -88909088909091090, 911090911090908910, -9088909088909091090
Offset: 1

Views

Author

R. J. Cano, Aug 19 2014

Keywords

Comments

Alternative definition: a(n,x)=T(x,1) for a dichromate or Tutte-Whitney polynomial in which the matrix t[i,j] is defined as t[i,j]=Delta(i,j)*((-1)^isprime(i)) and "Delta" is the Kronecker Delta function. - Michel Marcus, Aug 19 2014
If 10 is replaced by 1, then this becomes A097454. If it is replaced by 2, one gets A242002. Choosing powers of the base b=10, as done here, allows one to easily read off the equivalent for any other base b > 4, by simply replacing digits 8,9 with b-2,b-1 (when terms are written in base b). [Comment extended by M. F. Hasler, Aug 20 2014]
There are 2^n ways of taking the partial sum of the first n powers of b=10 if exponent zero is excluded and the signs can be assigned arbitrarily. Conjecture: When expressed in base b, the absolute value for any of these terms only contains digits belonging to {0,1,b-2,b-1}; here {0,1,8,9}.

Examples

			n=1 is not prime x^1 = (10)^1 = 10, therefore a(1)=10;
n=2 is prime and x^2 = (10)^2 = 100, taking it negative, a(2) = 10 - 100 = -90;
n=3 also is prime, x^3 = 1000, and we have a(3) = 10 - 100 - 1000 = -1090;
n=4 is not prime, so a(4) = 10 - 100 - 1000 + 10000 = 8910;
n=5 is prime, then a(5) = 10 - 100 - 1000 + 10000 - 100000 = -91090;
Examples of analysis for the concatenation patterns among the terms can be found at the "Additional Information" link.
		

Crossrefs

Cf. A097454.
The same kind of base-independent behavior: A215940, A217626.
Partial sums of alternating series: A181482, A222739, A213203.

Programs

  • Mathematica
    Table[Sum[ (-1)^Boole@ PrimeQ@ k*10^k, {k, n}], {n, 19}] (* Michael De Vlieger, Jan 03 2016 *)
  • PARI
    ap(n, x)={my(s); forprime(p=1, n, s+=x^p); s}
    a=(n, x=10)->(x^(n+1)-1)/(x-1)-2*ap(n, x)-1;
    
  • PARI
    Delta=(i, j)->(i==j); /* Kronecker's Delta function */
    t=n->matrix(n, n, i, j, Delta(i, j)*((-1)^isprime(i))); /* coeffs t[i, j] */
    /* Tutte polynomial over n */
    T(n, x, y)={my(t0=t(n)); sum(i=1, n, sum(j=1, n, t0[i, j]*(x^i)*(y^j)))};
    a=(n, x=10)->T(n, x, 1);
    
  • PARI
    A243106(n,b=10)=sum(k=1,n,(-1)^isprime(k)*b^k) \\ M. F. Hasler, Aug 20 2014

Formula

a(n,x) = Sum_{k=1..n} (-1)^isprime(k)*(x^k), for x=10 in decimal.

Extensions

Definition simplified by N. J. A. Sloane, Aug 19 2014
Definition further simplified and more terms from M. F. Hasler, Aug 20 2014

A171571 A050278/9, where A050278 are the pandigital numbers.

Original entry on oeis.org

113717421, 113717422, 113717431, 113717433, 113717442, 113717443, 113717521, 113717522, 113717541, 113717544, 113717552, 113717554, 113717631, 113717633, 113717641, 113717644, 113717663, 113717664, 113717742, 113717743, 113717752
Offset: 1

Views

Author

Zak Seidov, Dec 12 2009

Keywords

Comments

This is a finite sequence with 9*9! = 3265920 terms: a(9*9!) = 9876543210/9 = 1097393690. - Zak Seidov, Jan 14 2012
First differences are given in A217626. - M. F. Hasler, Sep 18 2017

Crossrefs

Cf. A050278: Pandigital numbers, numbers containing the digits 0-9.
Cf. A217626.

Programs

  • Mathematica
    (* first 720 terms: *) (1023000000 + FromDigits/@Permutations[{4,5,6,7,8,9}])/9

A218976 a(n) is the smallest positive integer such that 10^(2 + floor(k/a(1)) + floor(k/a(2)) + ... + floor(k/a(n))) divides (k+9)! for all k > 0.

Original entry on oeis.org

6, 16, 116, 241, 242, 491, 991, 2491, 3331, 14966, 15556, 62491, 78116, 83331, 249991, 264866, 546841, 1109366, 2265491, 4999861, 4999991, 5837041, 12499996, 25249861, 26011861, 36249091, 80070866, 190999991, 242090611, 365038621, 976562241, 1210466866, 1830622801
Offset: 1

Views

Author

Keywords

Comments

Every factorial of the form (k+9)! for every integer k > 0 ends at least in two zeros. This sequence gives a lower bound on the number of zeros.
This sequence is infinite and increasing, with 1/a(1) + 1/a(2) + ... = 1/4.
Conjecture: All terms except a(5) are 1 mod 5. - R. J. Cano, Nov 11 2012

Examples

			10^(2 + floor(5/5)) does not divide 14!, so a(1) > 5. But 10^(2 + floor(k/6)) divides (k+9)! for all k > 0, so a(1) = 6.
		

Crossrefs

Programs

  • PARI
    searchLimit(s1)={
        my(e,s2,f=(e,s)->(e+2-9*s)/(s-s1));
        while(s2<=s1, s2 += 1/5^e++);
        min(f(e,s2), f(e++,s2+=1/5^e))\1
    };
    v5(n)=my(s);while(n\=5,s+=n);s;
    nxt(v=[6])={
        my(S=sum(i=1,#v,1/v[i]), candidate=max(v[#v],1\(1/4-S))+1, k=candidate, lm=searchLimit(S+1/candidate));
        while(k<=lm,
            if(v5(k+9)<2+sum(i=1,#v,k\v[i])+k\candidate,
                candidate++;
                lm=searchLimit(S+1/candidate)
            ,
                k++
            )
        );
        candidate
    };
    steps(n)={
        my(v=[6],t);
        print1(6);
        for(i=2,n,
            t=nxt(v);
            print1(", "t);
            v=concat(v,t)
        );
        v
    };
    steps(20)

Formula

Let Psi(k) = 2 + sum_{n >= 1} floor(k/a(n)). Then 10^Psi(k) divides (k+9)!.

Extensions

a(32)-a(33) from Charles R Greathouse IV, Nov 19 2012
Showing 1-9 of 9 results.