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 16 results. Next

A002275 Repunits: (10^n - 1)/9. Often denoted by R_n.

Original entry on oeis.org

0, 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111, 11111111111, 111111111111, 1111111111111, 11111111111111, 111111111111111, 1111111111111111, 11111111111111111, 111111111111111111, 1111111111111111111, 11111111111111111111
Offset: 0

Views

Author

Keywords

Comments

R_n is a string of n 1's.
Base-4 representation of Jacobsthal bisection sequence A002450. E.g., a(4)= 1111 because A002450(4)= 85 (in base 10) = 64 + 16 + 4 + 1 = 1*(4^3) + 1*(4^2) + 1*(4^1) + 1. - Paul Barry, Mar 12 2004
Except for the first two terms, these numbers cannot be perfect squares, because x^2 != 11 (mod 100). - Zak Seidov, Dec 05 2008
For n >= 0: a(n) = (A000225(n) written in base 2). - Jaroslav Krizek, Jul 27 2009, edited by M. F. Hasler, Jul 03 2020
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=10, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det(A). - Milan Janjic, Feb 21 2010
Except 0, 1 and 11, all these integers are Brazilian numbers, A125134. - Bernard Schott, Dec 24 2012
Numbers n such that 11...111 = R_n = (10^n - 1)/9 is prime are in A004023. - Bernard Schott, Dec 24 2012
The terms 0 and 1 are the only squares in this sequence, as a(n) == 3 (mod 4) for n>=2. - Nehul Yadav, Sep 26 2013
For n>=2 the multiplicative order of 10 modulo the a(n) is n. - Robert G. Wilson v, Aug 20 2014
The above is a special case of the statement that the order of z modulo (z^n-1)/(z-1) is n, here for z=10. - Joerg Arndt, Aug 21 2014
From Peter Bala, Sep 20 2015: (Start)
Let d be a divisor of a(n). Let m*d be any multiple of d. Split the decimal expansion of m*d into 2 blocks of contiguous digits a and b, so we have m*d = 10^k*a + b for some k, where 0 <= k < number of decimal digits of m*d. Then d divides a^n - (-b)^n (see McGough). For example, 271 divides a(5) and we find 2^5 + 71^5 = 11*73*271*8291 and 27^5 + 1^5 = 2^2*7*31*61*271 are both divisible by 271. Similarly, 4*271 = 1084 and 10^5 + 84^5 = 2^5*31*47*271*331 while 108^5 + 4^5 = 2^12*7*31*61*271 are again both divisible by 271. (End)
Starting with the second term this sequence is the binary representation of the n-th iteration of the Rule 220 and 252 elementary cellular automaton starting with a single ON (black) cell. - Robert Price, Feb 21 2016
If p > 5 is a prime, then p divides a(p-1). - Thomas Ordowski, Apr 10 2016
0, 1 and 11 are only terms that are of the form x^2 + y^2 + z^2 where x, y, z are integers. In other words, a(n) is a member of A004215 for all n > 2. - Altug Alkan, May 08 2016
Except for the initial terms, the binary representation of the x-axis, from the left edge to the origin, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 737", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Mar 17 2017
The term "repunit" was coined by Albert H. Beiler in 1964. - Amiram Eldar, Nov 13 2020
q-integers for q = 10. - John Keith, Apr 12 2021
Binomial transform of A001019 with leading zero. - Jules Beauchamp, Jan 04 2022

References

  • Albert H. Beiler, Recreations in the Theory of Numbers: The Queen of Mathematics Entertains, New York: Dover Publications, 1964, chapter XI, p. 83.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 235-237.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1987, pp. 197-198.
  • Samuel Yates, Peculiar Properties of Repunits, J. Recr. Math. 2, 139-146, 1969.
  • Samuel Yates, Prime Divisors of Repunits, J. Recr. Math. 8, 33-38, 1975.

Crossrefs

Programs

  • Haskell
    a002275 = (`div` 9) . subtract 1 . (10 ^)
    a002275_list = iterate ((+ 1) . (* 10)) 0
    -- Reinhard Zumkeller, Jul 05 2013, Feb 05 2012
    
  • Magma
    [(10^n-1)/9: n in [0..25]]; // Vincenzo Librandi, Nov 06 2014
    
  • Maple
    seq((10^k - 1)/9, k=0..30); # Wesley Ivan Hurt, Sep 28 2013
  • Mathematica
    Table[(10^n - 1)/9, {n, 0, 19}] (* Alonso del Arte, Nov 15 2011 *)
    Join[{0},Table[FromDigits[PadRight[{},n,1]],{n,20}]] (* Harvey P. Dale, Mar 04 2012 *)
  • Maxima
    a[0]:0$
    a[1]:1$
    a[n]:=11*a[n-1]-10*a[n-2]$
    A002275(n):=a[n]$
    makelist(A002275(n),n,0,30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    a(n)=(10^n-1)/9; \\ Michael B. Porter, Oct 26 2009
    
  • PARI
    my(x='x+O('x^30)); concat(0, Vec(x/((1-10*x)*(1-x)))) \\ Altug Alkan, Apr 10 2016
    
  • Python
    print([(10**n-1)//9 for n in range(100)]) # Michael S. Branicky, Apr 30 2022
  • Sage
    [lucas_number1(n, 11, 10) for n in range(21)]  # Zerinvary Lajos, Apr 27 2009
    

Formula

a(n) = 10*a(n-1) + 1, a(0)=0.
a(n) = A000042(n) for n >= 1.
Second binomial transform of Jacobsthal trisection A001045(3n)/3 (A015565). - Paul Barry, Mar 24 2004
G.f.: x/((1-10*x)*(1-x)). Regarded as base b numbers, g.f. x/((1-b*x)*(1-x)). - Franklin T. Adams-Watters, Jun 15 2006
a(n) = 11*a(n-1) - 10*a(n-2), a(0)=0, a(1)=1. - Lekraj Beedassy, Jun 07 2006
a(n) = A125118(n,9) for n>8. - Reinhard Zumkeller, Nov 21 2006
a(n) = A075412(n)/A002283(n). - Reinhard Zumkeller, May 31 2010
a(n) = a(n-1) + 10^(n-1) with a(0)=0. - Vincenzo Librandi, Jul 22 2010
a(n) = A242614(n,A242622(n)). - Reinhard Zumkeller, Jul 17 2014
E.g.f.: (exp(9*x) - 1)*exp(x)/9. - Ilya Gutkovskiy, May 11 2016
a(n) = Sum_{k=0..n-1} 10^k. - Torlach Rush, Nov 03 2020
Sum_{n>=1} 1/a(n) = A065444. - Amiram Eldar, Nov 13 2020
From Elmo R. Oliveira, Aug 02 2025: (Start)
a(n) = A002283(n)/9 = A105279(n)/10.
a(n) = A010785(A017173(n-1)) for n >= 1. (End)

A031347 Multiplicative digital root of n (keep multiplying digits of n until reaching a single digit).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) = 0 for almost all n. - Charles R Greathouse IV, Oct 02 2013
More precisely, a(n) = 0 asymptotically almost surely, namely, among others, for all numbers n which have a digit '0', and as n has more and more digits, it becomes increasingly less probable that no digit is equal to zero. (The set A011540 has density 1.) Thus the density of numbers for which a(n) > 0 is zero, although this happens for infinitely many numbers, for example all repunits n = (10^k - 1)/9 = A002275(k). - M. F. Hasler, Oct 11 2015

Crossrefs

Cf. A007954, A007953, A003001, A010888 (additive digital root of n), A031286 (additive persistence of n), A031346 (multiplicative persistence of n).
Numbers having multiplicative digital roots 0-9: A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056.

Programs

  • Haskell
    a031347 = until (< 10) a007954
    -- Reinhard Zumkeller, Oct 17 2011, Sep 22 2011
    
  • Maple
    A007954 := proc(n) return mul(d, d=convert(n,base,10)): end: A031347 := proc(n) local m: m:=n: while(length(m)>1)do m:=A007954(m): od: return m: end: seq(A031347(n),n=0..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    mdr[n_] := NestWhile[Times @@ IntegerDigits@# &, n, UnsameQ, All]; Table[ mdr[n], {n, 0, 104}] (* Robert G. Wilson v, Aug 04 2006 *)
    Table[NestWhile[Times@@IntegerDigits[#] &, n, # > 9 &], {n, 0, 90}] (* Harvey P. Dale, Mar 10 2019 *)
  • PARI
    A031347(n)=local(resul); if(n<10, return(n) ); resul = n % 10; n = (n - n%10)/10; while( n > 0, resul *= n %10; n = (n - n%10)/10; ); return(A031347(resul))
    for(n=1,80, print1(A031347(n),",")) \\ R. J. Mathar, May 23 2006
    
  • PARI
    A031347(n)={while(n>9,n=prod(i=1,#n=digits(n),n[i]));n} \\ M. F. Hasler, Dec 07 2014
    
  • Python
    from operator import mul
    from functools import reduce
    def A031347(n):
        while n > 9:
           n = reduce(mul, (int(d) for d in str(n)))
        return n
    # Chai Wah Wu, Aug 23 2014
    
  • Python
    from math import prod
    def A031347(n):
        while n > 9: n = prod(map(int, str(n)))
        return n
    print([A031347(n) for n in range(100)]) # Michael S. Branicky, Apr 17 2024
    
  • Scala
    def iterDigitProd(n: Int): Int = n.toString.length match {
      case 1 => n
      case  => iterDigitProd(n.toString.toCharArray.map( - 48).scanRight(1)( * ).head)
    }
    (0 to 99).map(iterDigitProd) // Alonso del Arte, Apr 11 2020

Formula

a(n) = d in {1, ..., 9} if (but not only if) n = (10^k - 1)/9 + (d - 1)*10^m = A002275(k) + (d - 1)*A011557(m) for some k > m >= 0. - M. F. Hasler, Oct 11 2015

A034048 Numbers with multiplicative digital root value 0.

Original entry on oeis.org

0, 10, 20, 25, 30, 40, 45, 50, 52, 54, 55, 56, 58, 59, 60, 65, 69, 70, 78, 80, 85, 87, 90, 95, 96, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 120, 125, 130, 140, 145, 150, 152, 154, 155, 156, 158, 159, 160, 165, 169, 170, 178, 180, 185, 187, 190, 195
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

Numbers with root value 1 are the 'repunits' (see A000042).
This sequence has density 1. - Franklin T. Adams-Watters, Apr 01 2009
Any integer with at least one 0 among its base 10 digits is in this sequence. - Alonso del Arte, Aug 29 2014
This sequence is 10-automatic: it contains numbers with a 0, or with a 5 and any even digit. - Charles R Greathouse IV, Feb 13 2017

Examples

			20 is in the sequence because 2 * 0 = 0.
25 is in the sequence because 2 * 5 = 10 and 1 * 0 = 0.
		

Crossrefs

Cf. A031347, A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).
Cf. the subsets A011540 and A008592.

Programs

  • Mathematica
    mdr0Q[n_]:=NestWhile[Times@@IntegerDigits[#]&,n,#>9&]==0; Select[Range[ 0,200],mdr0Q] (* Harvey P. Dale, Jul 21 2020 *)
  • PARI
    is(n)=factorback(digits(n))==0 \\ Charles R Greathouse IV, Feb 13 2017

A034052 Numbers with multiplicative digital root value 5.

Original entry on oeis.org

5, 15, 35, 51, 53, 57, 75, 115, 135, 151, 153, 157, 175, 315, 351, 355, 359, 395, 511, 513, 517, 531, 535, 539, 553, 557, 571, 575, 579, 593, 597, 715, 751, 755, 759, 795, 935, 953, 957, 975, 1115, 1135, 1151, 1153, 1157, 1175, 1315, 1351, 1355, 1359, 1395
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

All digits of a(n) must be odd. - Robert Israel, Oct 19 2015

Crossrefs

Cf. A034048, A002275, A034049, A034050, A034051, this sequence, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Maple
    mdr:= proc(n) option remember;
    if n < 10 then return(n) fi;
    procname(convert(convert(n,base,10),`*`))
    end proc:
    select(mdr=5, [$1..10^5]); # Robert Israel, Oct 19 2015
  • Mathematica
    mrQ[n_]:=NestWhile[Times@@IntegerDigits[#]&,n,#>10&]==5; Select[Range[1395],mrQ[#]&] (* Jayanta Basu, May 30 2013 *)
  • PARI
    t(n) = {while(n>9, n=prod(i=1, #n=digits(n), n[i])); n};
    for(n=0, 1e4, if(t(n) == 5, print1(n", "))); \\ Altug Alkan, Oct 19 2015

Extensions

Incorrect formula removed by Martin Renner, Oct 19 2015

A034051 Numbers with multiplicative digital root value 4.

Original entry on oeis.org

4, 14, 22, 27, 39, 41, 72, 89, 93, 98, 114, 122, 127, 139, 141, 172, 189, 193, 198, 212, 217, 221, 249, 266, 271, 277, 294, 319, 333, 338, 346, 364, 379, 383, 391, 397, 411, 429, 436, 463, 492, 626, 634, 643, 662, 677, 712, 721, 727, 739, 767, 772, 776, 793
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Crossrefs

Cf. A031347.
Cf. A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Maple
    mdr:= proc(n) option remember;
    if n < 10 then return(n) fi;
    procname(convert(convert(n,base,10),`*`))
    end proc:
    select(mdr=4, [$1..10^5]); # Robert Israel, Oct 19 2015
  • Mathematica
    Select[Range@ 800, FixedPoint[Times @@ IntegerDigits@ # &, #] == 4 &] (* Michael De Vlieger, Oct 19 2015 *)
  • PARI
    t(n) = {while(n>9, n=prod(i=1, #n=digits(n), n[i])); n};
    for(n=0, 1e4, if(t(n) == 4, print1(n", "))); \\ Altug Alkan, Oct 19 2015

Extensions

Incorrect formula removed by Martin Renner, Oct 19 2015

A034049 Numbers with multiplicative digital root value 2.

Original entry on oeis.org

2, 12, 21, 26, 34, 37, 43, 62, 73, 112, 121, 126, 134, 137, 143, 162, 173, 211, 216, 223, 232, 261, 278, 279, 287, 297, 299, 314, 317, 322, 341, 367, 369, 371, 376, 389, 396, 398, 413, 431, 447, 469, 474, 496, 612, 621, 637, 639, 649, 666, 673, 693, 694, 713
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Crossrefs

Cf. A031347.
Cf. A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Maple
    A031347:= proc(n) local x;
      x:= n;
      while x > 10 do
        x:= convert(convert(x,base,10),`*`)
      od;
      x
    end proc:
    select(A031347=2, [$1..1000]); # Robert Israel, Jan 23 2023
  • Mathematica
    t = {}; n = 0; While[Length[t] < 100, n++; s = n; While[s > 10, s = Times @@ IntegerDigits[s]]; If[s == 2, AppendTo[t, n]]]; t (* T. D. Noe, Nov 15 2011 *)
  • PARI
    t(n) = {while(n>9, n=prod(i=1, #n=digits(n), n[i])); n};
    for(n=0, 1e3, if(t(n) == 2, print1(n", "))); \\ Altug Alkan, Oct 19 2015

Extensions

Incorrect formula removed by Martin Renner, Oct 19 2015

A034053 Numbers with multiplicative digital root value 6.

Original entry on oeis.org

6, 16, 23, 28, 32, 44, 47, 48, 61, 68, 74, 82, 84, 86, 116, 123, 128, 132, 144, 147, 148, 161, 168, 174, 182, 184, 186, 213, 218, 224, 227, 228, 231, 238, 242, 244, 246, 264, 267, 272, 276, 281, 282, 283, 288, 289, 298, 312, 321, 328, 344, 347, 368, 374, 377
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Crossrefs

Cf. A031347.
Cf. A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Mathematica
    mdr6Q[n_]:=NestWhile[Times@@IntegerDigits[#]&,n,#>9&]==6; Select[Range[400],mdr6Q] (* Harvey P. Dale, Jul 14 2024 *)

A034054 Numbers with multiplicative digital root value 7.

Original entry on oeis.org

7, 17, 71, 117, 171, 711, 1117, 1171, 1711, 7111, 11117, 11171, 11711, 17111, 71111, 111117, 111171, 111711, 117111, 171111, 711111, 1111117, 1111171, 1111711, 1117111, 1171111, 1711111, 7111111, 11111117, 11111171, 11111711, 11117111
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

Numbers with one 7, and zero or more 1s. - Daniel Forgues, Oct 09 2011

Crossrefs

Cf. A031347.
Cf. A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Mathematica
    Sort[Flatten[Table[FromDigits/@Permutations[Join[{7},PadRight[{},n,1]]],{n,0,10}]]] (* Harvey P. Dale, Jul 20 2015 *)
  • PARI
    t(k)=while(k>9, k=prod(i=1, #k=digits(k), k[i])); k
    for(n=1, 1e8, if(t(n) == 7, print1(n, ", "))); \\ Altug Alkan, Oct 22 2015

Formula

There are n(n+1)/2 elements up to 10^n, so a(n) is about 10^sqrt(2n).

A034050 Numbers with multiplicative digital root value 3.

Original entry on oeis.org

3, 13, 31, 113, 131, 311, 1113, 1131, 1311, 3111, 11113, 11131, 11311, 13111, 31111, 111113, 111131, 111311, 113111, 131111, 311111, 1111113, 1111131, 1111311, 1113111, 1131111, 1311111, 3111111, 11111113, 11111131, 11111311, 11113111
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

Numbers with one 3, and zero or more 1s. - Daniel Forgues, Oct 09 2011

Crossrefs

Cf. A031347.
Cf. A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Maple
    seq(seq((10^m-1)/9 + 2*10^j,j=0..m-1),m=1..10); # Robert Israel, Sep 27 2016
  • Mathematica
    Sort[Flatten[Table[FromDigits/@Permutations[Join[{3},PadRight[{},n,1]]],{n,0,8}]]] (* Harvey P. Dale, Jul 16 2012 *)
  • Python
    # through 8-digit terms
    print([int("1"*(d-i)+"3"+"1"*i) for d in range(8) for i in range(d+1)]) # Michael S. Branicky, Mar 13 2021

Formula

There are n(n+1)/2 members up to 10^n, so a(n) is about 10^sqrt(2n).
a(m*(m-1)/2+j+1) = (10^m-1)/9 + 2*10^j for 0 <= j < m. - Robert Israel, Sep 27 2016

A034056 Numbers with multiplicative digital root value 9.

Original entry on oeis.org

9, 19, 33, 91, 119, 133, 191, 313, 331, 911, 1119, 1133, 1191, 1313, 1331, 1911, 3113, 3131, 3311, 9111, 11119, 11133, 11191, 11313, 11331, 11911, 13113, 13131, 13311, 19111, 31113, 31131, 31311, 33111, 91111, 111119, 111133, 111191, 111313, 111331
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

Numbers with one 9 or two 3s, and zero or more 1s. - Daniel Forgues, Oct 09 2011

Crossrefs

Cf. A031347.
Cf. A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Mathematica
    Module[{nn=6,ne,te},ne=Union[FromDigits/@Flatten[Permutations/@Table[PadRight[{9},n,1],{n,nn}],1]];te=Rest[Union[FromDigits/@ Flatten[ Permutations/@Table[PadRight[{3,3},n,1],{n,nn}],1]]];Join[ne,te]]//Sort (* Harvey P. Dale, Apr 14 2025 *)

Formula

There are n(n+1)(n+2)/6 elements up to 10^n, so a(n) is about 10^sqrt(6n).
Showing 1-10 of 16 results. Next