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.

A145679 Lower limit of backward value of 2^n and n!.

This page as a plain text file.
%I A145679 #217 Aug 05 2025 19:59:54
%S A145679 2,1,1,0,1,0,0,1,0,1,0,1,1,0,0,1,0,1,0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,
%T A145679 1,0,1,1,0,0,1,1,0,0,1,0,1,1,0,1,0,1,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,
%U A145679 0,0,1,1,0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0
%N A145679 Lower limit of backward value of 2^n and n!.
%C A145679 For n!, omitting the trailing sequence of zeros. - _Simon Plouffe_, Mar 05 2017
%C A145679 The terms are deduced from sequence A023415.
%C A145679 The sum of constants in this sequence and A023415 is conjectured to be 11 exactly.
%C A145679 From _Cezary Glowacz_, Apr 12 2025, Jul 31 2025: (Start)
%C A145679 The backward value of 2^k is formed by writing the decimal digits of 2^k from least to most significant, so that for example 2^2489 = ...610112 becomes 2.11016..., and then the present constant is the infimum of all such backward values (excluding 2^0).
%C A145679 The equality of the backward sequences for n! omitting the trailing sequence zeros and 2^n holds under the conjecture that for each k and each r not divisible by 5 there are infinitely many n for which n! without trailing zeros = r mod 5^k. Actually this conjecture is true because for m > 0 g(k)^m = ((5^k)(5^(4m) - 1)/(5^4 - 1))! without leading zeros mod 5^k, and g(k) is a generator of the multiplicative group mod 5^k for k=3 mod 4 by induction using g(k+4)^l = g(k)^l <> 1 mod 5^k for l = 5^i or 4.
%C A145679 The above conjecture about the sum of constants in this sequence and A023415 can be proved using the recursion formulas for the sequences.
%C A145679 The sequence is not eventually periodic. Assuming any period results in a condition a(1)=0 mod 10 which contradicts a(1)=2.
%C A145679 The sequence has a property of having no runs of 0's or 1's of length 3n just after a prefix of length n. (End)
%C A145679 From _David A. Corneth_, Jun 15 2024: (Start)
%C A145679 a(1) through a(n) describes the smallest number with n digits (in base 10) not ending in 0 such that the number formed by concatenating the last k digits in reverse is a multiple of 2^k for 1 <= k <= n by choosing digits 0 or 1 for n >= 2.
%C A145679 If a(1) were 0, then a(n) would be 0 for all n. (End)
%H A145679 Cezary Glowacz, <a href="/A145679/b145679.txt">Table of n, a(n) for n = 1..10000</a>
%H A145679 Cezary Glowacz, <a href="/A145679/a145679.pdf">Two proofs regarding the n! without leading zeros sequence</a>
%F A145679 a(n) >= 0 and is the minimum satisfying (Sum_{i=1..n} a(i)*10^(i-1)) == 0 (mod 2^n), for n >= 2. - _Cezary Glowacz_, Jun 25 2024
%e A145679 From _David A. Corneth_, Jun 15 2024: (Start)
%e A145679 a(1) = 2. a(2) = 0 or 1. If a(2) = 0 then any number ending in 02 (the backwards concatenation of (2, 0)) should be a multiple of 2^2 = 4 but it is not. Any number ending in 12 (the backwards concatenation of (2, 1)) is a multiple of 2^2 = 4 so a(2) = 1.
%e A145679 Similarly a(3) = 1 as 112 is a multiple of 2^3 and 012 is not.
%e A145679 a(4) = 0 as 0112 is a multiple of 2^4 and 1112 is not.
%e A145679 a(5) = 1 as 10112 is a multiple of 2^5 and 00112 is not. (End)
%o A145679 (Python)
%o A145679 a,b=2,1; print('2',end=',')
%o A145679 for i in range(200): a=(a+(a&1)*b)>>1; b+=b<<2; print(a&1,end=',')
%o A145679 # _Cezary Glowacz_, Apr 12 2025
%o A145679 (PARI) first(n) = {
%o A145679 	my(t = 2);
%o A145679 	for(i = 2, n,
%o A145679 		if(t%2^i != 0,
%o A145679 			t = t + 10^(i-1);
%o A145679 		);
%o A145679 	);
%o A145679 	res = Vecrev(digits(t));
%o A145679 	res = concat(res, vector(n - #res));
%o A145679 } \\ _David A. Corneth_, Jun 15 2024
%Y A145679 Cf. A000079, A004154, A023415, A158624, A158625.
%K A145679 nonn,base
%O A145679 1,1
%A A145679 _Simon Plouffe_, Mar 23 2009
%E A145679 More terms from _Cezary Glowacz_, Feb 26 2017
%E A145679 More terms from _Jinyuan Wang_, Mar 01 2020