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.

A276039 Numbers using only digits 1 and 7.

This page as a plain text file.
%I A276039 #34 Jun 28 2025 19:47:49
%S A276039 1,7,11,17,71,77,111,117,171,177,711,717,771,777,1111,1117,1171,1177,
%T A276039 1711,1717,1771,1777,7111,7117,7171,7177,7711,7717,7771,7777,11111,
%U A276039 11117,11171,11177,11711,11717,11771,11777,17111,17117,17171,17177,17711,17717,17771,17777
%N A276039 Numbers using only digits 1 and 7.
%C A276039 Numbers k such that the product of digits of k is a power of 7.
%C A276039 There are no prime terms whose number of digits is divisible by 3: for every d that is a multiple of 3, every d-digit number j consisting of no digits other than 1's and 7's will have a digit sum divisible by 3, so j will also be divisible by 3. - _Mikk Heidemaa_, Mar 27 2021
%H A276039 David A. Corneth, <a href="/A276039/b276039.txt">Table of n, a(n) for n = 1..10000</a>
%e A276039 7717 is in the sequence because 7*7*1*7 = 343 = 7^3.
%t A276039 Select[Range[20000], IntegerQ[Log[7, Times@@(IntegerDigits[#])]] &] (* or *) Flatten[Table[FromDigits/@Tuples[{1, 7}, n], {n, 6}]]
%o A276039 (Magma) [n: n in [1..24000] | Set(Intseq(n)) subset {1,7}];
%o A276039 (PARI) is(n) = my(d=digits(n), e=[0, 2, 3, 4, 5, 6, 8, 9]); if(#setintersect(Set(d), Set(e))==0, return(1), return(0)) \\ _Felix Fröhlich_, Aug 19 2016
%o A276039 (PARI) a(n) = { my(b = binary(n + 1)); b = b[^1]; b = apply(x -> 6*x + 1, b); fromdigits(b) } \\ _David A. Corneth_, Mar 27 2021
%o A276039 (Python)
%o A276039 def a(n):
%o A276039   b = bin(n+1)[3:]
%o A276039   return int("".join(b.replace("1", "7").replace("0", "1")))
%o A276039 print([a(n) for n in range(1, 47)]) # _Michael S. Branicky_, Mar 27 2021
%o A276039 (Python)
%o A276039 def A276039(n): return 6*int(bin(n+1)[3:])+(10**((n+1).bit_length()-1)-1)//9 # _Chai Wah Wu_, Jun 28 2025
%Y A276039 Cf. similar sequences listed in A276037.
%Y A276039 Cf. A020455, A002275, A002281, A034054.
%K A276039 nonn,easy,base
%O A276039 1,2
%A A276039 _Vincenzo Librandi_, Aug 19 2016