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-10 of 27 results. Next

A276716 a(n) = A007953(n)*A047726(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 6, 8, 10, 12, 14, 16, 18, 20, 4, 6, 4, 10, 12, 14, 16, 18, 20, 22, 6, 8, 10, 6, 14, 16, 18, 20, 22, 24, 8, 10, 12, 14, 8, 18, 20, 22, 24, 26, 10, 12, 14, 16, 18, 10, 22, 24, 26, 28, 12, 14, 16, 18, 20, 22, 12, 26, 28, 30, 14, 16, 18, 20, 22, 24, 26, 14, 30, 32, 16
Offset: 1

Views

Author

Altug Alkan, Sep 17 2016

Keywords

Crossrefs

Programs

  • PARI
    A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);
    A007953(n) = sumdigits(n);
    a(n) = A007953(n)*A047726(n);

A196222 a(n) = A047726(n)^A047726(n), where A047726(n) is the number of numbers which can be written with n's digits.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 27, 27, 46656
Offset: 0

Views

Author

M. F. Hasler, Sep 29 2011

Keywords

Comments

Suggested by Franklin T. Adams-Watters and N. J. A. Sloane in analogy to A138908.

Crossrefs

A043537 Number of distinct base-10 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Keywords

Comments

a(A000079(A130694(n))) = 10. - Reinhard Zumkeller, Jul 29 2007
a(A000290(A016070(n))) = 2. - Reinhard Zumkeller, Aug 05 2010
a(n) = 10 for almost all n. - Charles R Greathouse IV, Oct 02 2013

Crossrefs

Programs

A179239 Permutation classes of integers, each identified by its smallest member.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 55, 56, 57, 58, 59, 60, 66, 67, 68, 69, 70, 77, 78, 79, 80, 88, 89, 90, 99, 100, 101, 102, 103
Offset: 0

Views

Author

Aaron Dunigan AtLee, Jul 04 2010

Keywords

Comments

Let the "permutation set" of a positive integer n be the set of all integers formed by permuting the digits of n. Two integers are "permutationally congruent" if they generate the same permutation set. A "permutation class" is a set of all permutationally congruent integers. This sequence lists each permutation class, identified by its smallest member.
These are also the positive integers in order, omitting any d-digit number n if a previously listed d-digit number is a permutation of the digits of n.
Range of A328447: smallest representative of the equivalence class of all numbers having the same digits up to permutation. Equivalently: Numbers with digits in nondecreasing order, except that the smallest nonzero digit must precede the zero digits. This sequence is useful when considering functions which depend only on the digits of n, e.g., the number of primes contained in n, cf. A039993, A039999, A075053 and the records therein, A072857 (primeval numbers) and A076497, resp. A239196 and A239197, etc. - M. F. Hasler, Oct 18 2019

Examples

			The permutation set of 24 is {24, 42}, and this is the equivalence class modulo permutations of both of them, so 24 is listed, but 42 is not.
The permutation set of 30 is {3, 30}, but 3 is not in the same permutation class as 30 since 30 cannot be obtained by permuting digits of 3. Therefore 30 is listed separately from 3.
The numbers 89 and 98 are also permutationally congruent and form a permutation class, so only the smaller one is listed.
		

Crossrefs

A variant of A009994.
Cf. A047726, A035927 (Number of distinct n-digit numbers up to permutations of digits).
Cf. A004186, A328447: largest & smallest representative of the class of n.

Programs

  • Mathematica
    maxTerm = 103; (*maxTerm is the greatest term you wish to see*) permutationSet[n_Integer] := FromDigits /@ Permutations[IntegerDigits[n]]; permutationCongruentQ[x_Integer, y_Integer] := Sort[permutationSet[x]] == Sort[permutationSet[y]]; DeleteDuplicates[Range[maxTerm], permutationCongruentQ]
    f[n_] := Block[{a = {0}, b = {DigitCount[0]}, i, w}, Do[w = DigitCount@ i; AppendTo[b, w]; If[! MemberQ[Most@ b, w], AppendTo[a, i]], {i, n}]; Rest@ a]; f@ 103 (* or faster: *)
    Select[Range@ 103, LessEqual @@ IntegerDigits@ # || And[Take[IntegerDigits@ #, Last@ DigitCount@ # + 1] == Reverse@ Take[Sort@ IntegerDigits@ #, Last@ DigitCount@ # + 1], LessEqual @@ DeleteCases[IntegerDigits@ #, d_ /; d == 0]] &] (* Michael De Vlieger, Jul 14 2015 *)
  • PARI
    is(n) = {my(d=digits(n),i); for(i=2,#d, if(d[i]!=0, d=vecextract(d,concat([1],vector(#d-i+1,j,i-1+j))); break));d==vecsort(d)||n/10^valuation(n,10)<10}
    \\given an element n, in base b, find the next element from the sequence.
    nxt(n,{b=10}) = {my(d = digits(n)); i = #d; while(i>0&&d[i]==b-1,i--); if(i>1, if(d[i]>0, d[i]++, d[i]=d[1];);for(j=i+1,#d,d[j]=d[i]), if(i==1, d[i]++;for(j=2,#d,d[j]=0), return(10^(#d))));sum(j=1,#d,d[j]*10^(#d-j))} \\ David A. Corneth, Apr 23 2016
    
  • PARI
    select( is_A179239(n)={n==A328447(n)}, [0..200]) \\ M. F. Hasler, Oct 18 2019
    
  • Python
    from itertools import count, chain, islice
    from sympy.utilities.iterables import combinations_with_replacement
    def A179239_gen(): # generator of terms
        return chain((0,),(int(a+''.join(b)) for l in count(1) for a in '123456789' for b in combinations_with_replacement('0'+''.join(str(d) for d in range(int(a),10)),l-1)))
    A179239_list = list(islice(A179239_gen(),31)) # Chai Wah Wu, Sep 13 2022

Extensions

Prefixed with a(0) = 0 by M. F. Hasler, Oct 18 2019

A045876 Sum of different permutations of digits of n (leading 0's allowed).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 33, 44, 55, 66, 77, 88, 99, 110, 22, 33, 22, 55, 66, 77, 88, 99, 110, 121, 33, 44, 55, 33, 77, 88, 99, 110, 121, 132, 44, 55, 66, 77, 44, 99, 110, 121, 132, 143, 55, 66, 77, 88, 99, 55, 121, 132, 143, 154, 66, 77, 88, 99, 110, 121, 66, 143
Offset: 1

Views

Author

Keywords

Comments

Let the arithmetic mean of the digits of a 'D' digit number n be 'A', let 'N' = number of distinct numbers that can be formed by permuting the digits of n, and let 'I' = concatenation of 1 'D' times = (10^D-1)/9. then a(n) = A*N*I. E.g., let n = 324541, then A = (3+2+4+5+4+1)/6 = 19/6, N = 6!/(2!) = 360, I = 111111, and a(n) = A*N*I = (19/6)*(360)*(111111) = 126666540. - Amarnath Murthy, Jul 14 2003
It seems that the first person who studied the sum of different permutations of digits of a given number was the French scientist Eugène Aristide Marre (1823-1918). See links. - Bernard Schott, Dec 06 2012

References

  • Amarnath Murthy, An interesting result in combinatorics, Mathematics & Informatics Quarterly, Vol. 3, 1999, Bulgaria.

Crossrefs

Same beginning as A033865. Cf. A061147.

Programs

  • Maple
    f:= proc(x) local L,D,n,M,s,j;
      L:= convert(x,base,10);
      D:= [seq(numboccur(j,L),j=0..9)];
      n:= nops(L);
      M:= n!/mul(d!,d=D);
      s:= add(j*D[j+1],j=0..9);
      (10^n-1)*M/9/n*s
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 07 2015
  • Mathematica
    Table[Total[FromDigits /@ Permutations[IntegerDigits[n]]], {n, 100}] (* T. D. Noe, Dec 06 2012 *)
  • PARI
    A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);
    A055642(n) = #Str(n);
    A007953(n) = sumdigits(n);
    a(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)); \\ Altug Alkan, Aug 29 2016
    
  • PARI
    A045876(n) = {my(d=digits(n), q=1, v, t=1); v = vecsort(d); for(i=1, #v-1, if(v[i]==v[i+1], t++, q*=binomial(i, t); t=1)); q*binomial(#v, t)*(10^#d-1)*vecsum(d)/9/#d} \\ David A. Corneth, Oct 06 2016

Formula

a(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)). - Altug Alkan, Aug 29 2016

A055098 Number of distinct anagrams of digits of n without leading zeros.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 4
Offset: 1

Views

Author

Henry Bottomley, Apr 19 2000

Keywords

Examples

			a(101)=2 since the digits of 101 can be ordered 101 or 110 (but not 011).
		

Crossrefs

Programs

  • Haskell
    import Data.List (permutations, nub)
    a055098 n = length $ nub $ filter ((> '0') . head) $ permutations $ show n
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Mathematica
    a[n_] := Length[ DeleteCases[ Permutations[ IntegerDigits[n]], {0 .., }]]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, Nov 30 2011 *)
  • PARI
    a(n)={my(v=digits(n), f=vector(10), n=#v); for(i=1, #v, f[1+v[i]]++); (1 - f[1]/n) * n! / prod(i=1, #f, f[i]!)} \\ Andrew Howroyd, Jan 27 2020
    
  • Python
    from math import factorial, prod
    def a(n):
        s = str(n); d, c = len(s), [s.count(str(i)) for i in range(10)]
        return (d-c[0])*factorial(d-1)//prod(map(factorial, c))
    print([a(n) for n in range(1, 50)]) # Michael S. Branicky, Aug 24 2022

Formula

a(n) = O(n/(log n)^(9/2)). - Charles R Greathouse IV, Aug 24 2022

A071268 Sum of all digit permutations of the concatenation of first n numbers.

Original entry on oeis.org

1, 33, 1332, 66660, 3999960, 279999720, 22399997760, 2015999979840, 201599999798400, 927359999990726400, 1064447999999893555200, 2058376319999997941623680, 4439635199999999955603648000, 10585935359999999998941406464000, 27655756127999999999972344243872000
Offset: 1

Views

Author

Amarnath Murthy, Jun 01 2002

Keywords

Comments

The permutations yield n! different numbers and if they are stacked vertically then the sum of each column is (n-1)! times the n-th triangular number = (n-1)!*n(n+1)/2. a(n) = [(n+1)!/2]*[{10^n -1}/9]. Note that this is only valid for 1 <= n <= 9.
The first person who studied the sum of different permutations of digits of a given number seems to be the French scientist Eugène Aristide Marre (1823-1918). See links. - Bernard Schott, Dec 07 2012

Examples

			For n=3, a(3) = 123 + 132 + 213 + 231 + 312 + 321 = 1332. - _Michael B. Porter_, Aug 28 2016
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local s, t, l;
          s:= cat("", seq(i, i=1..n)); t:= length(s);
          l:= (p-> seq(coeff(p, x, i), i=0..9))(add(x^parse(s[i]), i=1..t));
          (10^t-1)/9*combinat[multinomial](t, l)*add(i*l[i+1], i=1..9)/t
        end:
    seq(a(n), n=1..20);  # Alois P. Heinz, Jan 04 2019
  • Mathematica
    Table[Total@ Map[FromDigits, Permutations@ Flatten@ Map[IntegerDigits, Range@ n]], {n, 10}] (* or *)
    Table[Function[d, (((10^Length@ d - 1)/9)* Length@ Union@ Map[FromDigits, Permutations@ d] Total[d])/Length@ d]@ Flatten@ Map[IntegerDigits, Range@ n], {n, 11}] (* Michael De Vlieger, Aug 30 2016, latter after Harvey P. Dale at A047726 *)
  • PARI
    A007908(n) = my(s=""); for(k=1, n, s=Str(s, k)); eval(s);
    A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);
    A055642(n) = #Str(n);
    A007953(n) = sumdigits(n);
    a(n) = ((10^A055642(A007908(n))-1)/9)*(A047726(A007908(n))*A007953(A007908(n))/(A055642(A007908(n)))); \\ Altug Alkan, Aug 28 2016
    
  • Python
    from math import factorial
    from operator import mul
    from functools import reduce
    def A071268(n):
        s = ''.join(str(i) for i in range(1,n+1))
        return sum(int(d) for d in s)*factorial(len(s)-1)*(10**len(s)-1)//(9*reduce(mul,(factorial(d) for d in (s.count(w) for w in set(s))))) # Chai Wah Wu, Jan 04 2019

Formula

a(n) = (n + 1)!*(10^n - 1)/18 for 1 <= n <= 9.
a(n) = ((10^A055642(A007908(n))-1)/9)*(A047726(A007908(n))*A007953(A007908(n))/(A055642(A007908(n)))). - Altug Alkan, Aug 28 2016

Extensions

Edited by Robert G. Wilson v, Jun 03 2002
Corrected by Altug Alkan, Aug 28 2016

A138902 a(n) = d!, where d is the number of digits in n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 6
Offset: 0

Views

Author

Odimar Fabeny, May 16 2008

Keywords

Crossrefs

Different from A047726. Cf. A138908.

Programs

Formula

a(n) = A000142(A055642(n)). - James Spahlinger, Oct 09 2012

Extensions

Edited by N. J. A. Sloane, Sep 29 2011, at the suggestion of Franklin T. Adams-Watters

A193459 Total number of distinct divisors of all numbers that can be written by rearranging the digits of n in decimal representation.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 8, 3, 5, 6, 6, 3, 8, 5, 6, 8, 4, 7, 12, 8, 6, 13, 8, 7, 8, 3, 7, 4, 5, 5, 12, 3, 5, 6, 8, 5, 12, 5, 6, 11, 9, 5, 16, 6, 6, 6, 8, 5, 11, 4, 11, 8, 7, 5, 12, 6, 6, 12, 9, 11, 8, 7, 8, 14, 8, 3, 13, 3, 5, 8, 7, 4, 10, 3, 10, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 26 2011

Keywords

Comments

a(n) >= A000005(n), a(A193460(n)) = A000005(A193460(n)).

Examples

			a(20) = #{1,2,4,5,10,20} = 6;
a(21) = #{1,2,3,4,6,7,12,21} = 8;
a(22) = #{1,2,11,22} = 4;
a(23) = #{1,2,4,8,16,23,32} = 7;
a(24) = #{1,2,3,4,6,7,8,12,14,21,24,42} = 12;
a(25) = #{1,2,4,5,13,25,26,52} = 8;
a(26) = #{1,2,13,26,31,62} = 6;
a(27) = #{1,2,3,4,6,8,9,12,18,24,27,36,72} = 13;
a(28) = #{1,2,4,7,14,28,41,82} = 8;
a(29) = #{1,2,4,23,29,46,92} = 7.
		

Crossrefs

Cf. A047726.

Programs

  • Haskell
    import Data.List (permutations, nub)
    a193459 n =
       length $ nub $ concatMap divisors $ map read $ permutations $ show n
          where divisors n = filter ((== 0) . mod n) [1..n]
    a193459_list = map a193459 [1..]

A277061 Numbers with multiplicative digital root > 0.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 51, 53, 57, 61, 62, 63, 64, 66, 67, 68, 71, 72, 73, 74, 75, 76, 77, 79, 81, 82, 83, 84, 86, 88, 89, 91, 92, 93, 94, 97, 98, 99, 111, 112, 113, 114, 115
Offset: 1

Views

Author

J. Lowell, Sep 26 2016

Keywords

Comments

Question: when will numbers not in this sequence outnumber numbers in this sequence? Up to n = 1249, there are 524 terms, so 525 terms not in this sequence. Up to n = 1522, there are n/2 terms. No n > 1522 has that property. Up to 10^10, only about 1.46% of numbers are a term.
To find how many terms there are up to 10^n, see if A009994(i) is for 2 <= i <= binomial(n + 9, 9). If it is then that adds A047726(A009994(i)) to the total (we don't have to worry about digits 0 in A009994(i) as there aren't any for the specified i). One may put further constraints on i. For example, A009994(i) can't contain an even digit and a 5 in the same number. - David A. Corneth, Sep 27 2016

Examples

			25 is not in this sequence because 2*5 = 10 and 1*0 = 0.
		

Crossrefs

Cf. A031347, A034048 (complement).
Cf. A028843 (a subsequence).
Union of A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 1-9).
Cf. A052382 (a supersequence).

Programs

  • Mathematica
    Select[Range@ 112, FixedPoint[Times @@ IntegerDigits@ # &, #] > 0 &] (* Michael De Vlieger, Sep 26 2016 *)
  • PARI
    is(n) = n=digits(n); while(#n>1,n=digits(prod(i=1,#n,n[i]))); #n>0 \\ David A. Corneth, Sep 27 2016

Extensions

More terms from Michael De Vlieger, Sep 26 2016
Showing 1-10 of 27 results. Next