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

A047855 a(n) = A047848(7,n).

Original entry on oeis.org

1, 2, 12, 112, 1112, 11112, 111112, 1111112, 11111112, 111111112, 1111111112, 11111111112, 111111111112, 1111111111112, 11111111111112, 111111111111112, 1111111111111112, 11111111111111112, 111111111111111112, 1111111111111111112, 11111111111111111112, 111111111111111111112
Offset: 0

Views

Author

Keywords

Comments

n-th difference of a(n), a(n-1), ..., a(0) is A001019(n-1) for n >= 1.
Range of A164898, apart from first term. - Reinhard Zumkeller, Aug 30 2009
a(n) is the number of integers less than or equal to 10^n, whose initial digit is 1. - Michel Marcus, Jul 04 2019
a(n) is 2^n represented in bijective base-2 numeration. - Alois P. Heinz, Aug 26 2019
This sequence proves both A028842 (numbers with prime product of digits) and A028843 (numbers with prime iterated product of digits) are infinite. Proof: Suppose either of those sequences is finite. Label as omega the supposed last term. Compute n = ceiling(log_10 omega) + 1. Then a(n) > omega. The product of digits of a(n) is 2, contradicting the assumption that omega is the final term of either A028842 or A028843. - Alonso del Arte, Apr 14 2020
For n >= 2, the concatenation of a(n) with 8*a(n) equals (3*R_n+3)^2, where R_n = A002275(n) is the repunit with n 1's; hence this sequence, except for {1,2}, is a subsequence of A115549. - Bernard Schott, Apr 30 2022

Crossrefs

Programs

  • Magma
    [(10^n + 8)/9: n in [0..40]]; // G. C. Greubel, Jan 11 2025
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=10*a[n-1]+1 od: seq(a[n]+1, n=0..18); # Zerinvary Lajos, Mar 20 2008
  • Mathematica
    Join[{1}, Table[FromDigits[PadLeft[{2}, n, 1]], {n, 30}]] (* Harvey P. Dale, Apr 17 2013 *)
    (10^Range[0, 29] + 8)/9 (* Alonso del Arte, Apr 12 2020 *)
  • PARI
    a(n)=if(n==0,1,if(n==1,2,11*a(n-1)-10*a(n-2)))
    for(i=0,10,print1(a(i),",")) \\ Lambert Klasen, Jan 28 2005
    
  • Python
    def A047855(n): return (pow(10,n) +8)//9
    print([A047855(n) for n in range(41)]) # G. C. Greubel, Jan 11 2025
  • Sage
    [gaussian_binomial(n,1,10)+1 for n in range(17)] # Zerinvary Lajos, May 29 2009
    
  • Scala
    (List.fill(20)(10: BigInt)).scanLeft(1: BigInt)( * ).map(n => (n + 8)/9) // Alonso del Arte, Apr 12 2020
    

Formula

a(n) = (10^n + 8)/9. - Ralf Stephan, Feb 14 2004
a(0) = 1, a(1) = 2, a(n) = 11*a(n-1) - 10*a(n-2) for n > 1. - Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 28 2005
G.f.: (1 - 9*x)/(1 - 11*x + 10*x^2). - Philippe Deléham, Oct 05 2009
a(n) = 10*a(n-1) - 8 (with a(0) = 1). - Vincenzo Librandi, Aug 06 2010
From Elmo R. Oliveira, Apr 03 2025: (Start)
E.g.f.: exp(x)*(8 + exp(9*x))/9.
a(n) = (A062397(n) - A002281(n))/2. (End)

Extensions

More terms from Harvey P. Dale, Apr 17 2013

A028842 Numbers whose product of digits is prime.

Original entry on oeis.org

2, 3, 5, 7, 12, 13, 15, 17, 21, 31, 51, 71, 112, 113, 115, 117, 121, 131, 151, 171, 211, 311, 511, 711, 1112, 1113, 1115, 1117, 1121, 1131, 1151, 1171, 1211, 1311, 1511, 1711, 2111, 3111, 5111, 7111, 11112, 11113, 11115, 11117, 11121, 11131, 11151
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007954, A028843, A028834, A046703 (subsequence of primes).

Programs

  • Mathematica
    Select[Range[11160], PrimeQ[Times@@IntegerDigits[#]] &] (* Jayanta Basu, Jun 02 2013 *)
  • PARI
    isok(n) = isprime(vecprod(digits(n))); \\ Michel Marcus, Apr 17 2020
    
  • PARI
    is(n)=my(d=digits(n),p); for(i=1,#d,if(d[i]==1,next); if(isprime(d[i]) && !p, p=1, return(0))); p \\ Charles R Greathouse IV, Apr 18 2020
  • Sage
    [x for x in range(10^5) if (prod(Integer(x).digits(base=10))) in Primes()] # Bruno Berselli, May 05 2014
    
  • Scala
    (1 to 10000).filter(n => List(2, 3, 5, 7).contains(n.toString.toCharArray.map( - 48).scanRight(1)( * ).head)) // _Alonso del Arte, Apr 14 2020
    

Extensions

More terms from Erich Friedman.
Name edited by Jianing Song, Jul 07 2025

A028835 Numbers whose iterated sum of digits is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 12, 14, 16, 20, 21, 23, 25, 29, 30, 32, 34, 38, 39, 41, 43, 47, 48, 50, 52, 56, 57, 59, 61, 65, 66, 68, 70, 74, 75, 77, 79, 83, 84, 86, 88, 92, 93, 95, 97, 101, 102, 104, 106, 110, 111, 113, 115, 119, 120, 122, 124, 128, 129, 131, 133, 137, 138, 140, 142, 146, 147, 149, 151, 155, 156
Offset: 1

Views

Author

Keywords

Comments

Also numbers k such that k mod 9 is an element of {2,3,5,7}. Hence as n tends to infinity, a(n)/n converges to 9/4 quite rapidly. - Stefan Steinerberger, Apr 23 2006

Examples

			38 -> 3 + 8 = 11 -> 1 + 1 = 2 is a prime.
		

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a028835 n = a028835_list !! (n-1)
    a028835_list = findIndices (`elem` [2,3,5,7]) $ map a010888 [0..]
    -- Reinhard Zumkeller, Oct 21 2011
  • Mathematica
    Select[Range[200], PrimeQ[Mod[ #, 9]] &] (* Stefan Steinerberger, Apr 23 2006 *)

Extensions

Extended (and corrected) by Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

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

A226186 Composite numbers with both additive and multiplicative digital roots prime.

Original entry on oeis.org

12, 21, 34, 57, 75, 115, 232, 299, 322, 371, 376, 398, 511, 579, 597, 637, 713, 731, 736, 759, 763, 795, 893, 938, 957, 975, 992, 1112, 1121, 1137, 1157, 1173, 1175, 1211, 1299, 1317, 1355, 1371, 1389, 1398, 1469, 1474, 1496, 1517, 1535, 1649, 1694
Offset: 1

Views

Author

Jayanta Basu, Jun 03 2013

Keywords

Examples

			322 is here since for 322 additive digital root is 7 and multiplicative digital root is 2, both are primes.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := NestWhile[Times@@IntegerDigits[#]&, n, #>9&]; Select[Range[1700], !PrimeQ[#] && And@@PrimeQ[{a[#], Mod[#,9]}]&]

A333955 Numbers k with digits in nondecreasing order and each digit greater than 1 such that the iterated product of digits of k is a prime.

Original entry on oeis.org

2, 3, 5, 7, 26, 34, 35, 37, 57, 223, 278, 279, 299, 355, 359, 367, 369, 389, 447, 469, 557, 579, 666, 999, 2247, 2269, 2337, 2339, 2349, 2366, 2699, 2799, 3335, 3336, 3338, 3346, 3357, 3399, 3499, 3669, 3679, 3889, 3999, 4689, 4788, 5579, 5777, 6668, 22227, 22239, 22336
Offset: 1

Views

Author

David A. Corneth, Apr 11 2020

Keywords

Comments

Primitive sequence of A028843. If k is in this sequence, then one can concatenate as many 1s as one likes, and/or permute the digits, to get terms of A028843 that are not in this sequence. For example, from 35 in this sequence, we can obtain 135, 1135, 11135, ... as well as 153, 315, 351, 1153, 1315, 1351, 1513, 1531, etc.

Examples

			For 35, we have 3 * 5 = 15 and then 1 * 5 = 5, which is a prime. Furthermore, the digits of 35 are nondecreasing and all digits of 35 are greater than 1, so 35 is in the sequence.
Likewise with 37, we see that 3 * 7 = 21 and 2 * 1 = 2, which is prime, and 3 < 7, so 37 is also in the sequence. The numbers 137, 1137, 11137, etc., are in A028843 but are not in this sequence of account of containing the digit 1.
With 43, we confirm that 4 * 3 = 12 and 1 * 2 = 2, which is prime, but 4 > 3, so 43 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[25000], Min[(d = IntegerDigits[#])] > 1 && (Length[d] < 2 || Min @ Differences[d] > -1) && PrimeQ[FixedPoint[IntegerDigits @ (Times @@ #)&, d][[1]]] &] (* Amiram Eldar, Apr 14 2020 *)
  • PARI
    is(n) = my(d=digits(n), v); if(d!=(v=vecsort(d))||v[1]<2, return(0)); while(n>=10, n=vecprod(digits(n))); isprime(n)
    
  • Scala
    def hasDigitsSorted(n: Int): Boolean = {
      val digSort = Integer.parseInt(n.toString.toCharArray.sorted.mkString)
      n == digSort
    }
    def iterDigitProd(n: Int): Int = n.toString.length match {
      case 1 => n
      case  => iterDigitProd(n.toString.toCharArray.map( - 48).scanRight(1)( * ).head)
    }
    val prelim = (1 to 20000).filter(hasDigitsSorted(_)).filter(n => List(2, 3, 5, 7).contains(iterDigitProd(n)))
    prelim.filter(!.toString.startsWith("1")) // _Alonso del Arte, Apr 20 2020

A117159 Prime numbers for which the multiplicative digital root is also a prime number.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 37, 43, 53, 71, 73, 113, 131, 137, 151, 157, 173, 211, 223, 311, 317, 359, 367, 389, 431, 557, 571, 593, 673, 751, 827, 839, 929, 953, 983, 1117, 1151, 1153, 1171, 1223, 1279, 1297, 1367, 1447, 1511, 1531, 1553, 1571, 1579, 1597, 1621
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 21 2006; corrected Apr 30 2006

Keywords

Examples

			157 is in the sequence because it is a prime number and its multiplicative digital root 5 is also a prime number.
		

Crossrefs

Intersection of A000040 and A028843.
Cf. A031347.

Programs

  • Mathematica
    a[n_]:=NestWhile[Times@@IntegerDigits[#]&,n,#>9&]; Select[Prime[Range[258]],PrimeQ[a[#]]&] (* Jayanta Basu, Jun 02 2013 *)

A333960 Numbers k with digits in nondecreasing order and each digit > 1 such that the iterated product of digits of k is a prime and k is the least positive integer with this property and its product of digits.

Original entry on oeis.org

2, 3, 5, 7, 26, 35, 37, 57, 355, 278, 279, 359, 299, 557, 389, 579, 999, 2699, 2799, 5579, 5777, 3889, 4788, 3999, 35559, 26999, 29999, 47888, 277777, 357799, 267999, 557779, 288999, 2777778, 689999, 779999, 2688888, 7777888, 26777777, 6788899, 27777899, 47778899, 67788888, 77788888, 2677777889, 7777777788, 26888888889
Offset: 1

Views

Author

David A. Corneth, Apr 11 2020

Keywords

Comments

Primitive sequence to A333955.

Examples

			26 is in the sequence. It has iterated product of digits 2 which is prime and its digits are in nondecreasing order and all digits are > 1 and 26 is the least integer with these properties having product of digits 12.
34 is not in the sequence. It has all properties mentioned above except it has product of digits 12 where 34 isn't the least positive integer with those properties and product of digits 12.
		

Crossrefs

Showing 1-8 of 8 results.