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.

A256340 Numbers which have only digits 7 and 8 in base 10.

This page as a plain text file.
%I A256340 #19 Sep 08 2022 08:46:11
%S A256340 7,8,77,78,87,88,777,778,787,788,877,878,887,888,7777,7778,7787,7788,
%T A256340 7877,7878,7887,7888,8777,8778,8787,8788,8877,8878,8887,8888,77777,
%U A256340 77778,77787,77788,77877,77878,77887,77888,78777,78778,78787,78788,78877,78878
%N A256340 Numbers which have only digits 7 and 8 in base 10.
%H A256340 Vincenzo Librandi, <a href="/A256340/b256340.txt">Table of n, a(n) for n = 1..8190</a>
%H A256340 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.
%F A256340 a(n) = A007931(n) + A002280(A000523(n+1)) = A256292(n) + A256077(n) etc.
%t A256340 Flatten[Table[FromDigits[#,10]&/@Tuples[{7,8},n],{n,5}]]
%o A256340 (Magma) [n: n in [1..35000] | Set(IntegerToSequence(n, 10)) subset {7, 8}];
%o A256340 (PARI) A256340(n)=vector(#n=binary(n+1)[2..-1],i,10^(#n-i))*n~+10^#n\9*7
%o A256340 (Magma) [n: n in [1..100000] | Set(Intseq(n)) subset {7,8}]; // _Vincenzo Librandi_, Aug 19 2016
%o A256340 (Python)
%o A256340 def a(n): return int(bin(n+1)[3:].replace('0', '7').replace('1', '8'))
%o A256340 print([a(n) for n in range(1, 45)]) # _Michael S. Branicky_, Jul 08 2021
%Y A256340 Cf. A007088 (digits 0 & 1), A007931 (digits 1 & 2), A032810 (digits 2 & 3), A032834 (digits 3 & 4), A256290 (digits 4 & 5), A256291 (digits 5 & 6), A256292 (digits 6 & 7), A256341 (digits 8 & 9).
%K A256340 nonn,base,easy
%O A256340 1,1
%A A256340 _M. F. Hasler_, Mar 27 2015