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

A061827 Number of partitions of n into parts which are the digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 5, 4, 4, 3, 3, 3, 3, 1, 11, 1, 4, 7, 3, 5, 2, 4, 2, 1, 11, 6, 1, 3, 3, 7, 2, 2, 5, 1, 11, 11, 4, 1, 3, 4, 2, 7, 2, 1, 11, 6, 4, 3, 1, 2, 2, 2, 2, 1, 11, 11, 11, 6, 3, 1, 2, 3, 4, 1, 11, 6, 4, 3, 3, 2, 1, 2, 2, 1, 11, 11, 4, 11, 3, 4, 2, 1, 2, 1, 11, 6, 11, 3, 3, 6, 2, 2
Offset: 1

Views

Author

Amarnath Murthy, May 28 2001

Keywords

Comments

a(A125289(n)) = 1, a(A125290(n)) > 1.

Examples

			For n = 11, 1+1+1+1+1+1+1+1+1+1+1. so a(11) = 1. For n = 12, 2+2+2+2+2+2 = 2+2+1+1+1+1+1+1+1+1 = ...etc
a(20) = 1: the only partitions permitted use the digits 0 and 2, so there is just 1, 20 = 2+2+2... ten times.
		

Crossrefs

Programs

  • Haskell
    import Data.List (sort, nub)
    import Data.Char (digitToInt)
    a061827 n =
       p n (map digitToInt $ nub $ sort $ filter (/= '0') $ show n) where
          p _ []        = 0
          p 0 _         = 1
          p m ds'@(d:ds)
            | m < d     = 0
            | otherwise = p (m - d) ds' + p m ds
    -- Reinhard Zumkeller, Aug 01 2011
  • Mathematica
    Length[IntegerPartitions[#,All,DeleteDuplicates@DeleteCases[IntegerDigits[#],0]]]&/@Range[200] (* Sander G. Huisman, Nov 14 2022 *)

Extensions

More terms from David Wasserman, Jul 29 2002

A125292 Numbers having either no ones or no twos in their ternary representation.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 18, 20, 24, 26, 27, 28, 30, 31, 36, 37, 39, 40, 54, 56, 60, 62, 72, 74, 78, 80, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121, 162, 164, 168, 170, 180, 182, 186, 188, 216, 218, 222, 224, 234, 236, 240, 242, 243
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 26 2006

Keywords

Comments

Complement of A125293; union of A005823 and A005836;
A125291(a(n)) = 1; A062756(a(n))*A081603(a(n)) = 0.

Crossrefs

Subsequence of A154314.

Programs

  • Mathematica
    not[n_]:=Module[{c=DigitCount[n,3]},c[[1]]==0||c[[2]]==0]; Select[ Range[ 250],not] (* Harvey P. Dale, Dec 15 2012 *)
  • PARI
    is(n, base=3) = #Set(select(sign, digits(n, base)))==1 \\ Rémy Sigrist, Mar 28 2020
    
  • PARI
    a(n, base=3) = { for (w=0, oo, if (n<=(base-1)*2^w, my (d=1+(n-1)\2^w, k=2^w+(n-1)%(2^w)); return (d*fromdigits(binary(k), base)), n -= (base-1)*2^w)) } \\ Rémy Sigrist, Mar 28 2020

A336956 For any number n whose set of nonzero decimal digits is { d_0, ..., d_k } (with d_0 < ... < d_k), a(n) is obtained by replacing in the decimal representation of n each nonzero digit d_m by d_{k-m} for m = 0..k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 20, 12, 22, 32, 42, 52, 62, 72, 82, 92, 30, 13, 23, 33, 43, 53, 63, 73, 83, 93, 40, 14, 24, 34, 44, 54, 64, 74, 84, 94, 50, 15, 25, 35, 45, 55, 65, 75, 85, 95, 60, 16, 26, 36, 46, 56, 66, 76
Offset: 0

Views

Author

Rémy Sigrist, Aug 09 2020

Keywords

Comments

This sequence is a self-inverse permutation of nonnegative integers.
This sequence first differs from A321474 for n = 112: a(112) = 221 whereas A321474(112) = 211.
This sequence has similarities with A166166; here we consider nonzero decimal digits, there binary run-lengths.

Examples

			For n = 10251:
- the set of nonzero digits is { 1, 2, 5},
- so we replace each digit 1, 2, 5 respectively by 5, 2, 1,
- and a(10251) = 50215.
		

Crossrefs

Programs

  • PARI
    a(n, base=10) = { my (d=digits(n, base), s=Set(select(sign, d))); fromdigits(apply (t -> if (t, s[#s+1-setsearch (s,t)], 0), d), base) }

Formula

a(n) = n iff n = 0 or n belongs to A125289.

A382056 Remove every copy of the largest digit of n; if any digits remain, return the number formed by arranging the remaining digits in nondecreasing order. If no digits remain, return 0.

Original entry on oeis.org

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

Views

Author

Ali Sada, Mar 13 2025

Keywords

Comments

This sequence is inspired by a joke from Finnish comedian ISMO: "The hardest part in English for me is silent letters. You write them down but never say. But since you have silent letters in the language, why don’t you also have silent numbers? They would be far more useful. Like, I owe you 75 dollars, but the 7 is silent."

Examples

			For n = 132, we remove the largest digit and we get a(132) = 12. For n = 66, we remove the largest digit and we get a(66) = 0.
		

Crossrefs

Cf. A054055 (largest digit of n), A125289 (numbers with only one (distinct) digit > 0), A382401.

Programs

  • Maple
    a:= n-> (l-> (m-> (h-> add(h[j]*10^(j-1), j=1..nops(h))
         )(subs(m=NULL, l)))(max(l)))(convert(n, base, 10)):
    seq(a(n), n=1..102);  # Alois P. Heinz, Mar 14 2025
  • Mathematica
    A382056[n_] := FromDigits[DeleteCases[#, Max[#]]] & [IntegerDigits[n]];
    Array[A382056, 100] (* Paolo Xausa, Mar 23 2025 *)
  • PARI
    apply( {A382056(n, m=vecmax(digits(n)))=fromdigits([d | d<-digits(n), dM. F. Hasler, Mar 14 2025
  • Python
    def a(n):
        s = str(n)
        m = max(s)
        r = s.replace(m, "")
        return int(r) if r != "" else 0
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Mar 13 2025
    

Formula

a(n) = 0 for n in A125289. - M. F. Hasler, Mar 14 2025

Extensions

Definition clarified by N. J. A. Sloane, Mar 23 2025

A333607 Numbers k with unique nonzero digit in decimal representation of 1/k.

Original entry on oeis.org

1, 2, 3, 5, 9, 10, 11, 15, 18, 20, 25, 30, 33, 45, 50, 90, 99, 100, 101, 110, 111, 125, 150, 165, 180, 198, 200, 225, 250, 300, 303, 330, 333, 450, 495, 500, 900, 909, 990, 999, 1000, 1001, 1010, 1100, 1110, 1111, 1125, 1250, 1287, 1500, 1515, 1650, 1665, 1800
Offset: 1

Views

Author

Rémy Sigrist, Mar 28 2020

Keywords

Comments

This sequence has similarities with A125289; here we consider the decimal representation of 1/n, there that of n.
This sequence contains A333402.
If m belongs to the sequence, then 10*m also belongs to the sequence.

Examples

			The first terms, alongside their inverse, are:
  n   a(n)  1/a(n)
  --  ----  -----------
   1     1  1
   2     2  0.5
   3     3  0.333333...
   4     5  0.2
   5     9  0.111111...
   6    10  0.1
   7    11  0.090909...
   8    15  0.066666...
   9    18  0.055555...
  10    20  0.05
  11    25  0.04
  12    30  0.033333...
  13    33  0.030303...
		

Crossrefs

Programs

  • PARI
    See Links section.

A352057 Triangular numbers whose nonzero digits are all the same.

Original entry on oeis.org

0, 1, 3, 6, 10, 55, 66, 300, 666, 990, 3003, 5050, 10011, 66066, 500500, 600060, 50005000, 5000050000, 500000500000, 50000005000000, 5000000050000000, 500000000500000000, 50000000005000000000, 5000000000050000000000, 500000000000500000000000, 50000000000005000000000000
Offset: 1

Views

Author

Steven Lu, Mar 02 2022

Keywords

Comments

This sequence may correspond to "monochromatic step squads" in the British animation "Numberblocks".
Conjecture: the largest term in this sequence whose nonzero digits are not 5 is 600060.

Crossrefs

Supersequence of A037156.
Cf. A352148 (indices of these triangular numbers).

Programs

  • Mathematica
    (* Method1 *)
    NonZeroQ[n_Integer] := n != 0; Select[
    Table[n (n + 1)/2, {n, 0, 1000000}],
    Length[Tally[Select[IntegerDigits[#], NonZeroQ]]] == 1 &]
    (* Method2 *)
    Sort[Select[
      Flatten[Outer[Times,
        Table[FromDigits[IntegerDigits[n, 2]], {n, 2^16 - 1}], Range[9]]],
       IntegerQ[Sqrt[8 # + 1]] &]]
  • PARI
    isok(k) = my(d=digits(k*(k+1)/2)); d = select(x->(x!=0), d); #Set(d)<=1;
    lista(nn) = {for (n=0, nn, if (isok(n), print1(n*(n+1)/2, ", ")););} \\ Michel Marcus, Mar 02 2022
  • Python
    from sympy import integer_nthroot
    from sympy.utilities.iterables import multiset_permutations
    def istri(n): return integer_nthroot(8*n+1, 2)[1]
    def zplus1(digits):
        if digits == 1: yield 0
        for d1 in "123456789":
            digset = "0"*(digits-1) + d1*(digits-1)
            for mp in multiset_permutations(digset, digits-1):
                t = int(d1 + "".join(mp))
                yield t
    def afind(maxdigits):
        for digits in range(1, maxdigits+1):
            for t in zplus1(digits):
                if istri(t):
                    print(t, end=", ")
    afind(22) # Michael S. Branicky, Mar 02 2022
    

Extensions

a(24)-a(25) from Michael S. Branicky, Mar 02 2022

A343215 Differences between consecutive numbers with unique nonzero digit in decimal representation.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 2, 8, 3, 7, 4, 6, 5, 5, 6, 4, 7, 3, 8, 2, 9, 1, 1, 9, 1, 89, 2, 18, 2, 78, 3, 27, 3, 67, 4, 36, 4, 56, 5, 45, 5, 45, 6, 54, 6, 34, 7, 63, 7, 23, 8, 72, 8, 12, 9, 81, 9, 1, 1, 9, 1, 89, 1, 9, 1, 889, 2, 18, 2, 178, 2, 18, 2, 778
Offset: 1

Views

Author

Keywords

Crossrefs

First differences of A125289.

Formula

a(n) = A125289(n+1) - A125289(n).
Showing 1-7 of 7 results.