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

A276037 Numbers using only digits 1 and 5.

Original entry on oeis.org

1, 5, 11, 15, 51, 55, 111, 115, 151, 155, 511, 515, 551, 555, 1111, 1115, 1151, 1155, 1511, 1515, 1551, 1555, 5111, 5115, 5151, 5155, 5511, 5515, 5551, 5555, 11111, 11115, 11151, 11155, 11511, 11515, 11551, 11555, 15111, 15115, 15151, 15155, 15511, 15515
Offset: 1

Views

Author

Vincenzo Librandi, Aug 17 2016

Keywords

Comments

Numbers n such that product of digits of n is a power of 5.

Examples

			5551 is in the sequence because all of its digits are 1 or 5 and consequently because the product of digits, 5*5*5*1 = 125 = 5^3 is a power of 5.
		

Crossrefs

Cf. numbers n such that product of digits of n is a power of k: A028846 (k=2), A174813 (k=3), this sequence (k=5), A276038 (k=6), A276039 (k=7).
Cf. A199985 (a subsequence).

Programs

  • Magma
    [n: n in [1..20000] | Set(Intseq(n)) subset {1, 5}]; // Vincenzo Librandi, Aug 19 2016
    
  • Maple
    S[0]:= [0]:
    for d from 1 to 6 do S[d]:= map(t -> (10*t+1, 10*t+5), S[d-1]) od:
    seq(op(S[d]),d=1..6); # Robert Israel, Aug 22 2016
  • Mathematica
    Select[Range[20000], IntegerQ[Log[5, Times@@(IntegerDigits[#])]]&]
  • PARI
    a(n) = my(v=[1,5], b=binary(n+1), d=vector(#b-1,i, v[b[i+1]+1])); sum(i=1, #d, d[i] * 10^(#d-i)) \\ David A. Corneth, Aug 22 2016
  • Python
    from itertools import product
    A276037_list = [int(''.join(d)) for l in range(1,10) for d in product('15',repeat=l)] # Chai Wah Wu, Aug 18 2016
    
  • Python
    def A276037(n): return (int(bin(n+1)[3:])<<2)+(10**((n+1).bit_length()-1)-1)//9 # Chai Wah Wu, Jun 28 2025
    

Formula

From Robert Israel, Aug 22 2016: (Start)
a(2n+1) = 10 a(n) + 1.
a(2n+2) = 10 a(n) + 5.
G.f. g(x) satisfies g(x) = 10 (x + x^2) g(x^2) + (x + 5 x^2)/(1 - x^2). (End)

Extensions

Example changed by David A. Corneth, Aug 22 2016

A201054 Composite numbers whose product of digits is 5.

Original entry on oeis.org

15, 51, 115, 511, 1115, 5111, 11115, 11151, 11511, 15111, 51111, 111115, 111151, 111511, 115111, 151111, 1111115, 1111511, 1115111, 1151111, 1511111, 5111111, 11111115, 11111151, 11111511, 11115111, 11151111, 11511111, 15111111, 51111111, 111111115, 111111151
Offset: 1

Views

Author

Jaroslav Krizek, Nov 26 2011

Keywords

Comments

Complement of A107691 with respect to A199985. Subsequence of A201018 (composite numbers whose multiplicative digital root is 5).

Examples

			Number 115 is in sequence because 1*1*5=5.
		

Crossrefs

Cf. A107691 (primes whose product of digits is 5), A199985 (numbers whose product of digits is 5).

Programs

  • Maple
    remove(isprime,[seq(seq((10^m-1)/9 + 4*10^j,j=0..m-1),m=1..10)]); # Robert Israel, Jan 03 2017
Showing 1-2 of 2 results.