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!.

Original entry on oeis.org

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, 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, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Simon Plouffe, Mar 23 2009

Keywords

Comments

For n!, omitting the trailing sequence of zeros. - Simon Plouffe, Mar 05 2017
The terms are deduced from sequence A023415.
The sum of constants in this sequence and A023415 is conjectured to be 11 exactly.
From Cezary Glowacz, Apr 12 2025, Jul 31 2025: (Start)
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).
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.
The above conjecture about the sum of constants in this sequence and A023415 can be proved using the recursion formulas for the sequences.
The sequence is not eventually periodic. Assuming any period results in a condition a(1)=0 mod 10 which contradicts a(1)=2.
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)
From David A. Corneth, Jun 15 2024: (Start)
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.
If a(1) were 0, then a(n) would be 0 for all n. (End)

Examples

			From _David A. Corneth_, Jun 15 2024: (Start)
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.
Similarly a(3) = 1 as 112 is a multiple of 2^3 and 012 is not.
a(4) = 0 as 0112 is a multiple of 2^4 and 1112 is not.
a(5) = 1 as 10112 is a multiple of 2^5 and 00112 is not. (End)
		

Crossrefs

Programs

  • PARI
    first(n) = {
    	my(t = 2);
    	for(i = 2, n,
    		if(t%2^i != 0,
    			t = t + 10^(i-1);
    		);
    	);
    	res = Vecrev(digits(t));
    	res = concat(res, vector(n - #res));
    } \\ David A. Corneth, Jun 15 2024
  • Python
    a,b=2,1; print('2',end=',')
    for i in range(200): a=(a+(a&1)*b)>>1; b+=b<<2; print(a&1,end=',')
    # Cezary Glowacz, Apr 12 2025
    

Formula

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

Extensions

More terms from Cezary Glowacz, Feb 26 2017
More terms from Jinyuan Wang, Mar 01 2020