A145679 Lower limit of backward value of 2^n and n!.
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
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)
Links
- Cezary Glowacz, Table of n, a(n) for n = 1..10000
- Cezary Glowacz, Two proofs regarding the n! without leading zeros sequence
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
Comments