[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A276037
Numbers using only digits 1 and 5.
16
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,2
COMMENTS
Numbers n such that product of digits of n is a power of 5.
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)
EXAMPLE
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.
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[#])]]&]
PROG
(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
(Magma) [n: n in [1..20000] | Set(Intseq(n)) subset {1, 5}]; // Vincenzo Librandi, Aug 19 2016
(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
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).
Sequence in context: A136976 A136975 A136973 * A221743 A137008 A137010
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Aug 17 2016
EXTENSIONS
Example changed by David A. Corneth, Aug 22 2016
STATUS
approved