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

A047841 Autobiographical numbers: Fixed under operator T (A047842): "Say what you see".

Original entry on oeis.org

22, 10213223, 10311233, 10313314, 10313315, 10313316, 10313317, 10313318, 10313319, 21322314, 21322315, 21322316, 21322317, 21322318, 21322319, 31123314, 31123315, 31123316, 31123317, 31123318, 31123319
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

A digit count numerically summarizes the frequency of digits 0 through 9 in that order when they occur in a number.
This uses a different method from A108810. Here the digits are described in increasing order, whereas in A108810 they can be described in any order.
This sequence is finite, since T(x) < x for every x with at least 22 digits. Last term is a(109) = 101112213141516171819. - Schimke
A character in the Verghese (2009) novel declares that 10213223 "is the only number that describes itself when you read it." - Alonso del Arte, Jan 26 2014

Examples

			10313314 contains 1 0's, 3 1's, 3 3's and 1 4's, hence T(10313314) = 10313314 is in the sequence
The entry 3122331418, for instance, is a member since it is indeed made up of three 1's, two 2's, three 3's, one 4 and one 8.
		

References

  • J. N. Kapur, Reflections of a Mathematician, Chapter 33, pp. 314-318, Arya Book Depot, New Delhi 1996.
  • Abraham Verghese, Cutting for Stone: A Novel. New York: Alfred A. Knopf (2009): 294.

Crossrefs

Cf. A005151, which is the sequence 1, T(1), T(T(1)), .. ending in the fixed-point 21322314.

Extensions

Entry revised by N. J. A. Sloane, Dec 15 2006

A237605 Numbers n such that A047842(n) | n.

Original entry on oeis.org

0, 22, 777, 4444, 303300, 333333, 555555, 588588, 666666, 888688, 2032230, 5055555, 5858558, 6568588, 6868288, 7339393, 8282088, 10213223, 10311233, 10313314, 10313315, 10313316, 10313317, 10313318, 10313319, 20002200, 21322314, 21322315, 21322316, 21322317, 21322318
Offset: 1

Views

Author

Paolo P. Lava, Feb 10 2014

Keywords

Comments

Autobiographical numbers (A047841) are a subset of this sequence.
The first 3 terms which contain more than 9 copies of a digit are 666666666666, 898888888898 and 4444044404444. - Giovanni Resta, Feb 10 2014

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,b,c,d,f,n,v; print(0); v:=array[0..9];
    for n from 1 to q do a:=n; for b from 0 to 9 do v[b]:=0; od;
    while a>0 do b:=a mod 10; v[b]:=v[b]+1; a:=trunc(a/10); od; a:=0;
    for b from 0 to 9 do if v[b]>0 then c:=10*v[b]+b; f:=0; d:=c;
    while d>0 do f:=f+1; d:=trunc(d/10); od; a:=a*10^f+c; fi; od;
    if type(n/a,integer) then print(n); fi; od; end: P(10^10);
  • Mathematica
    Select[Range[10^6], Mod[#, FromDigits@ Flatten[IntegerDigits /@ Flatten[ Reverse /@ Tally@ Sort@ IntegerDigits@#]]] == 0 &] (* Giovanni Resta, Feb 10 2014 *)

A278439 Numbers k such that k | A047842(k).

Original entry on oeis.org

1, 2, 5, 22, 105, 188, 258, 327, 663, 15425, 16654, 27848, 40324, 80328, 481263, 10213223, 10311233, 10313314, 10313315, 10313316, 10313317, 10313318, 10313319, 21322314, 21322315, 21322316, 21322317, 21322318, 21322319, 31123314, 31123315, 31123316, 31123317
Offset: 1

Views

Author

Paolo P. Lava, Nov 22 2016

Keywords

Comments

The sequence is bounded. Let us consider a k-digit number n in which all 10 numerals from 0 to 9 are equally distributed: there are k/10 0's, k/10 1's, etc. This is the best case in order to have a number with the greatest number of digits under the transform n -> A047842(n). The number of digits we get is 10 + 10*floor(log_10(k/10) + 1), which must be >= k. The inequality becomes log_10(k/10) >= k/10 - 2, which is solved by k <= 23.75... This means that no term of the sequence can have more than 23 digits.

Examples

			A237605(258) = 121518 and 121518/258 = 471.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,c,d,j,k,n; for n from 1 to q do
    a:=sort(convert(n,base,10)); k:=1; b:=a[1]; c:=0; for j from 2 to nops(a) do
    if a[j]=b then k:=k+1; else d:=10*k+b; c:=c*10^(ilog10(d)+1)+d; k:=1; b:=a[j]; fi; od;
    d:=10*k+b; c:=c*10^(ilog10(d)+1)+d; if type(c/n,integer) then print(n); fi; od; end: P(10^10);

Extensions

a(32) corrected by Sean A. Irvine, May 27 2025

A097601 Differences between A045918 and A047842.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 99, 0, 0, 0, 0, 0, 0, 0, 0, 297, 198, 99, 0, 0, 0, 0, 0, 0, 0, 396, 297, 198, 99, 0, 0, 0, 0, 0, 0, 495, 396, 297, 198, 99, 0, 0, 0, 0, 0, 594, 495, 396, 297, 198, 99, 0, 0, 0, 0, 693, 594, 495, 396, 297, 198, 99, 0, 0
Offset: 0

Views

Author

Odimar Fabeny, Aug 29 2004

Keywords

Crossrefs

Programs

  • Mathematica
    LookAndSayA[n_]:= FromDigits@Flatten@IntegerDigits@Flatten[Through[ {Length, First}[#]] & /@ Split@IntegerDigits@n]; dc[n_]:= FromDigits@ Flatten@Select[Table[{DigitCount[n, 10, k], k}, {k, 0, 9}], #[[1]] > 0 &]; Table[LookAndSayA[n] - dc[n], {n, 0, 100}]

Extensions

Terms a(31) onward added by G. C. Greubel, Jan 14 2019

A235775 a(n) = A047842(A047842(n)), say what you see, once repeated.

Original entry on oeis.org

1011, 21, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1031, 1112, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 102112, 3112, 22, 211213, 211214, 211215, 211216, 211217, 211218, 211219, 102113, 3113, 211213, 1213, 211314, 211315, 211316, 211317, 211318
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 15 2014

Keywords

Comments

a(n) does not depend on the order of digits of n, a property inherited from A047842. - M. F. Hasler, Jan 11 2024

Examples

			a(10) = A047842(1011) = 1031;
a(11) = A047842(21) = 1112;
a(12) = A047842(1112) = 3112;
a(100) = A047842(2011) = 102112;
a(101) = A047842(1021) = 102112;
a(102) = A047842(101112) = 104112.
For n = 20231231, digits of the date 2023-12-31, a(n) = 10213223 = A047842(n) because this is a fixed point of A047842. Since the order of the digits of n does not matter and there are no leading zeros, this holds also for the numbers resulting from notation dd.mm.yyyy or mm/dd/yyyy. - _M. F. Hasler_, Jan 11 2024
		

Crossrefs

Programs

  • Haskell
    a235775 = a047842 . a047842
    
  • PARI
    A235775(n) = A047842(A047842(n)) \\ M. F. Hasler, Jan 11 2024
  • Python
    def A235775(n):
        s = str(n)
        s = ''.join(str(s.count(d))+d for d in sorted(set(s)))
        return int(''.join(str(s.count(d))+d for d in sorted(set(s)))) # Chai Wah Wu, Feb 12 2023
    

Formula

From M. F. Hasler, Jan 11 2024: (Start)
a(n) = a(A328447(n)) = a(m) for all n and all m having the same digits as n, considering their respective multiplicity.
a(n) = A047842(n) =: m iff m is a fixed point of A047842. (End)

A097599 Differences between A097598 and A047842.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 198, 297, 396, 495, 594, 693, 792, 0, 0, 0, 99, 198, 297, 396, 495, 594, 693, 0
Offset: 0

Views

Author

Odimar Fabeny, Aug 29 2004

Keywords

Crossrefs

A010785 Repdigit numbers, or numbers whose digits are all equal.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999, 111111, 222222, 333333, 444444, 555555, 666666
Offset: 0

Views

Author

Keywords

Comments

Complement of A139819. - David Wasserman, May 21 2008
Subsequence of A134336 and of A178403. - Reinhard Zumkeller, May 27 2010
Subsequence of A193460. - Reinhard Zumkeller, Jul 26 2011
Intersection of A009994 and A009996. - David F. Marrs, Sep 29 2018
Beiler (1964) called these numbers "monodigit numbers". The term "repdigit numbers" was used by Trigg (1974). - Amiram Eldar, Jan 21 2022

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, New York, 1964, p. 83.

Crossrefs

Programs

  • Haskell
    a010785 n = a010785_list !! n
    a010785_list = 0 : r [1..9] where
       r (x:xs) = x : r (xs ++ [10*x + x `mod` 10])
    -- Reinhard Zumkeller, Jul 26 2011
    
  • Magma
    [(n-9*Floor((n-1)/9))*(10^Floor((n+8)/9)-1)/9: n in [0..50]]; // Vincenzo Librandi, Nov 10 2014
    
  • Maple
    A010785 := proc(n)
        (n-9*floor(((n-1)/9)))*((10^(floor(((n+8)/9)))-1)/9) ;
    end proc:
    seq(A010785(n), n = 0 .. 100); # Robert Israel, Nov 09 2014
  • Mathematica
    fQ[n_]:=Module[{id=IntegerDigits[n]}, Length[Union[id]]==1]; Select[Range[0,10000], fQ] (* Vladimir Joseph Stephan Orlovsky, Dec 29 2010 *)
    Union[FromDigits/@Flatten[Table[PadRight[{},i,n],{n,0,9},{i,6}],1]] (* or *) LinearRecurrence[{0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,-10}, {0,1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88},40] (* Harvey P. Dale, Dec 28 2011 *)
    Union@ Flatten@ Table[k (10^n - 1)/9, {k, 0, 9}, {n, 6}] (* Robert G. Wilson v, Oct 09 2014 *)
    Table[(n - 9 Floor[(n-1)/9]) (10^Floor[(n+8)/9] - 1)/9, {n, 0, 50}] (* José de Jesús Camacho Medina, Nov 06 2014 *)
  • PARI
    a(n)=10^((n+8)\9)\9*((n-1)%9+1) \\ Charles R Greathouse IV, Jun 15 2011
    
  • PARI
    nxt(n,t=n%10)=if(t<9,n*(t+1),n*10+9)\t \\ Yields the term a(k+1) following a given term a(k)=n. M. F. Hasler, Jun 24 2016
    
  • PARI
    is(n)={1==#Set(digits(n))}
    inv(n) = 9*#Str(n) + n%10 - 9 \\ David A. Corneth, Jun 24 2016
    
  • Python
    def a(n): return 0 if n == 0 else int(str((n-1)%9+1)*((n-1)//9+1))
    print([a(n) for n in range(55)]) # Michael S. Branicky, Dec 29 2021
    
  • Python
    print([0]+[int(d*r) for r in range(1, 7) for d in "123456789"]) # Michael S. Branicky, Dec 29 2021
    
  • Python
    # without string operations
    def a(n): return 0 if n == 0 else (10**((n-1)//9+1)-1)//9*((n-1)%9+1)
    print([a(n) for n in range(55)]) # Michael S. Branicky, Nov 03 2023

Formula

A037904(a(n)) = 0. - Reinhard Zumkeller, Dec 14 2007
A178401(a(n)) > 0. - Reinhard Zumkeller, May 27 2010
From Reinhard Zumkeller, Jul 26 2011: (Start)
For n > 0: A193459(a(n)) = A000005(a(n)).
for n > 10: a(n) mod 10 = floor(a(n)/10) mod 10.
A010879(n) = A010879(A059995(n)). (End)
A202022(a(n)) = 1. - Reinhard Zumkeller, Dec 09 2011
a(0)=0, a(1)=1, a(2)=2, a(3)=3, a(4)=4, a(5)=5, a(6)=6, a(7)=7, a(8)=8, a(9)=9, a(10)=11, a(11)=22, a(12)=33, a(13)=44, a(14)=55, a(15)=66, a(16)=77, a(17)=88, a(n) = 11*a(n-9) - 10*a(n-18). - Harvey P. Dale, Dec 28 2011
A151949(a(n)) = 0; A180410(a(n)) = A227362(a(n)). - Reinhard Zumkeller, Jul 09 2013
a(n) = (n - 9*floor((n-1)/9))*(10^floor((n+8)/9) - 1)/9. - José de Jesús Camacho Medina, Nov 06 2014
G.f.: x*(1+2*x+3*x^2+4*x^3+5*x^4+6*x^5+7*x^6+8*x^7+9*x^8)/((1-x^9)*(1-10*x^9)). - Robert Israel, Nov 09 2014
A047842(a(n)) = A244112(a(n)). - Reinhard Zumkeller, Nov 11 2014
Sum_{n>=1} 1/a(n) = (7129/2520) * A065444 = 3.11446261209177581335... - Amiram Eldar, Jan 21 2022

Extensions

Name clarified by Jon E. Schoenfield, Nov 10 2023

A005151 Summarize the previous term (digits in increasing order), starting with a(1) = 1.

Original entry on oeis.org

1, 11, 21, 1112, 3112, 211213, 312213, 212223, 114213, 31121314, 41122314, 31221324, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314
Offset: 1

Views

Author

Keywords

Comments

a(n) = 21322314 for n > 12. - Reinhard Zumkeller, Jan 25 2014
The digits of each term a(n) are a permutation of those of the corresponding term A063850(n). - Chayim Lowen, Jul 16 2015

Examples

			The term after 312213 is obtained by saying "Two 1's, two 2's, two 3's", which gives 21-22-23, i.e., 212223.
		

References

  • C. Fleenor, "A litteral sequence", Solution to Problem 2562, Journal of Recreational Mathematics, vol. 31 No. 4 pp. 307 2002-3 Baywood NY.
  • Problem in J. Recreational Math., 30 (4) (1999-2000), p. 309.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005150, A047842. See A083671 for another version.

Programs

  • Haskell
    import Data.List (group, sort, transpose)
    a005151 n = a005151_list !! (n-1)
    a005151_list = 1 : f [1] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map length zss, map head zss]
              zss = group $ sort xs
    -- Reinhard Zumkeller, Jan 25 2014
    
  • Mathematica
    RunLengthEncode[x_List] := (Through[{Length, First}[ #1]] &) /@ Split[ Sort[x]]; LookAndSay[n_, d_:1] := NestList[ Flatten[ RunLengthEncode[ # ]] &, {d}, n - 1]; F[n_] := LookAndSay[n, 1][[n]]; Table[ FromDigits[ F[n]], {n, 25}] (* Robert G. Wilson v, Jan 22 2004 *)
    a[1] = 1; a[n_] := a[n] = FromDigits[Reverse /@ Sort[Tally[a[n-1] // IntegerDigits], #1[[1]] < #2[[1]]&] // Flatten]; Array[a, 26] (* Jean-François Alcover, Jan 25 2016 *)
  • PARI
    say(n) = {digs = digits(n); d = vecsort(digs,,8); s = ""; for (k=1, #d, nbk = #select(x->x==d[k], digs); s = concat(s, Str(nbk)); s = concat(s, d[k]);); eval(s);}
    lista(nn) = {print1(n = 1, ", "); for (k=1, nn, m = say(n); print1(m, ", "); n = m;);} \\ Michel Marcus, Feb 12 2016
    
  • PARI
    a(n,show_all=1,a=1)={for(i=2,n,show_all&&print1(a",");a=A047842(a));a} \\ M. F. Hasler, Feb 25 2018
    
  • PARI
    Vec(x*(1 + 10*x + 10*x^2 + 1091*x^3 + 2000*x^4 + 208101*x^5 + 101000*x^6 - 99990*x^7 - 98010*x^8 + 31007101*x^9 + 10001000*x^10 - 9900990*x^11 - 9899010*x^12) / (1 - x) + O(x^40)) \\ Colin Barker, Aug 23 2018
    
  • Python
    from itertools import accumulate, groupby, repeat
    def summarize(n, _):
      return int("".join(str(len(list(g)))+k for k, g in groupby(sorted(str(n)))))
    def aupton(nn): return list(accumulate(repeat(1, nn+1), summarize))
    print(aupton(25)) # Michael S. Branicky, Jan 11 2021

Formula

a(n+1) = A047842(a(n)). - M. F. Hasler, Feb 25 2018
G.f.: x*(1 + 10*x + 10*x^2 + 1091*x^3 + 2000*x^4 + 208101*x^5 + 101000*x^6 - 99990*x^7 - 98010*x^8 + 31007101*x^9 + 10001000*x^10 - 9900990*x^11 - 9899010*x^12) / (1 - x). - Colin Barker, Aug 23 2018

A244112 Reverse digit count of n in decimal representation.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1110, 21, 1211, 1311, 1411, 1511, 1611, 1711, 1811, 1911, 1210, 1211, 22, 1312, 1412, 1512, 1612, 1712, 1812, 1912, 1310, 1311, 1312, 23, 1413, 1513, 1613, 1713, 1813, 1913, 1410, 1411, 1412, 1413, 24, 1514, 1614, 1714
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 11 2014

Keywords

Comments

Frequencies of digits 0 through 9, occurring in n, are summarized in order of decreasing digits;
a(A010785(n)) = A047842(A010785(n)).

Examples

			101 contains two 1s and one 0, therefore a(101) = 2110;
102 contains one 2, one 1 and one 0, therefore a(102) = 121110.
		

Crossrefs

See A036058 for the orbit of 0 under this map.

Programs

  • Haskell
    import Data.List (sort, group); import Data.Function (on)
    a244112 :: Integer -> Integer
    a244112 n = read $ concat $
       zipWith ((++) `on` show) (map length xs) (map head xs)
       where xs = group $ reverse $ sort $ map (read . return) $ show n
    
  • Mathematica
    f[n_] := Block[{s = Split@ IntegerDigits@ n}, FromDigits@ Reverse@ Riffle[Union@ Flatten@ s, Length@# & /@ s]]; Array[f, 48, 0] (* Robert G. Wilson v, Dec 01 2016 *)
  • PARI
    A244112(n,c=1,S="")={for(i=2,#n=vecsort(digits(n),,4),n[i]==n[i-1]&&c++&&next;S=Str(S,c,n[i-1]);c=1);eval(Str(S,c,if(n,n[#n])))} \\ M. F. Hasler, Feb 25 2018
  • Python
    def A244112(n):
        return int(''.join([str(str(n).count(d))+d for d in '9876543210' if str(n).count(d) > 0])) # Chai Wah Wu, Dec 01 2016
    

A267493 Autobiographical numbers in base 5: numbers which are fixed or belong to a cycle under the operator T.

Original entry on oeis.org

22, 10213223, 10313314, 10311233, 21322314, 31123314, 101111314, 101111213, 101111214, 111121314, 1031223314, 10111221314
Offset: 1

Views

Author

Antonia Münchenbach, Jan 16 2016

Keywords

Comments

The T operator numerically summarizes the frequency of digits 0 through 4 in that order when they occur in a number. The numbers and the frequency are written in base 5.
These are all autobiographical numbers in base 5 which lead to a fixed-point or belong to a cycle. However, in base 5 there are no cycles of length greater than 1, that is, all the terms are fixed-points.

Examples

			10213223 contains 1 0's, 2 1's, 3 2's and 2 3's.
		

References

  • Antonia Münchenbach and Nicole Anton George, "Eine Abwandlung der Conway-Folge", contribution to "Jugend forscht" 2016, 2016

Crossrefs

Showing 1-10 of 27 results. Next