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.

A276037 Numbers using only digits 1 and 5.

This page as a plain text file.
%I A276037 #33 Jun 28 2025 19:48:42
%S A276037 1,5,11,15,51,55,111,115,151,155,511,515,551,555,1111,1115,1151,1155,
%T A276037 1511,1515,1551,1555,5111,5115,5151,5155,5511,5515,5551,5555,11111,
%U A276037 11115,11151,11155,11511,11515,11551,11555,15111,15115,15151,15155,15511,15515
%N A276037 Numbers using only digits 1 and 5.
%C A276037 Numbers n such that product of digits of n is a power of 5.
%H A276037 Chai Wah Wu, <a href="/A276037/b276037.txt">Table of n, a(n) for n = 1..8190</a>
%F A276037 From _Robert Israel_, Aug 22 2016: (Start)
%F A276037 a(2n+1) = 10 a(n) + 1.
%F A276037 a(2n+2) = 10 a(n) + 5.
%F A276037 G.f. g(x) satisfies g(x) = 10 (x + x^2) g(x^2) + (x + 5 x^2)/(1 - x^2). (End)
%e A276037 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.
%p A276037 S[0]:= [0]:
%p A276037 for d from 1 to 6 do S[d]:= map(t -> (10*t+1, 10*t+5), S[d-1]) od:
%p A276037 seq(op(S[d]),d=1..6); # _Robert Israel_, Aug 22 2016
%t A276037 Select[Range[20000], IntegerQ[Log[5, Times@@(IntegerDigits[#])]]&]
%o A276037 (Python)
%o A276037 from itertools import product
%o A276037 A276037_list = [int(''.join(d)) for l in range(1,10) for d in product('15',repeat=l)] # _Chai Wah Wu_, Aug 18 2016
%o A276037 (Python)
%o A276037 def A276037(n): return (int(bin(n+1)[3:])<<2)+(10**((n+1).bit_length()-1)-1)//9 # _Chai Wah Wu_, Jun 28 2025
%o A276037 (Magma) [n: n in [1..20000] | Set(Intseq(n)) subset {1, 5}]; // _Vincenzo Librandi_, Aug 19 2016
%o A276037 (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
%Y A276037 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).
%Y A276037 Cf. A199985 (a subsequence).
%K A276037 nonn,base
%O A276037 1,2
%A A276037 _Vincenzo Librandi_, Aug 17 2016
%E A276037 Example changed by _David A. Corneth_, Aug 22 2016