login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..8190

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

Adjacent sequences:  A276034 A276035 A276036 * A276038 A276039 A276040

KEYWORD

nonn,base

AUTHOR

Vincenzo Librandi, Aug 17 2016

EXTENSIONS

Example changed by David A. Corneth, Aug 22 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 12 02:02 EDT 2020. Contains 335658 sequences. (Running on oeis4.)