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.

Showing 1-4 of 4 results.

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

A158625 Lower limit of backward value of 5^n.

Original entry on oeis.org

5, 2, 1, 3, 0, 2, 3, 3, 0, 4, 3, 1, 1, 3, 1, 1, 2, 4, 2, 1, 0, 3, 1, 3, 3, 0, 0, 0, 2, 3, 1, 4, 1, 0, 2, 1, 0, 3, 4, 3, 0, 2, 1, 2, 2, 1, 1, 4, 4, 3, 4, 0, 2, 0, 4, 0, 2, 2, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 3, 3, 2, 0, 1, 1, 4, 4, 2, 0, 1, 4, 2, 4, 1, 2, 0, 4
Offset: 1

Views

Author

Simon Plouffe, Mar 23 2009

Keywords

Comments

Digits are all in {0,1,2,3,4} after the first term.
The upper limit is A158624, 0.5265679578796997657885576975995789586775656...
The sequence is not eventually periodic. Assuming any period results in a condition a(1)=0 mod 10 which contradicts a(1)=5. - Cezary Glowacz, Jul 22 2024

Examples

			5^3 = 125 so the backward value is 0.521, 5^10 = 9765625, so backward value is 0.5265679. The lower limit of all values is a constant, which appears to be 0.521302330431131124210313300023141021034302...
From _N. J. A. Sloane_, May 11 2018: (Start)
To describe this another way:  write down the decimal expansion of powers of 5:
  1
  5
  25
  125
  625
  3125
  ...
keep going forever.
Write them backwards:
  1
  5
  52
  526
  5213
  ...
After a while the beginning digits are all the same.
That's the sequence. (End)
		

Crossrefs

Programs

  • Magma
    D:=87; e:=6; for d in [2..D-1] do t:=Modexp(5,e,10^(d+1)); if t div 10^d ge 5 then e+:=2^(d-2); end if; end for; t:=Modexp(5,e,10^D); IntegerToSequence(t,10); // Jon E. Schoenfield, Feb 05 2018
  • Python
    # lower limit of backward sequence of 5^n
    a,i=5,0; x=a
    while i < 100:
         i+=1; print(x, end=',')
         x=(-a//pow(5,i)*pow(3,i))%5; a+=x*pow(10,i)
    # Cezary Glowacz, Jul 29 2024
    

Formula

a(n) >= 0 and is the minimum satisfying (Sum_{i=1..n} a(i)*10^(i-1)) == 0 (mod 5^n), for n >= 2. - Cezary Glowacz, Jul 24 2024

A023409 If any power of 2 ends with k 6's and 7's, they must be the first k terms of this sequence in reverse order.

Original entry on oeis.org

6, 7, 7, 7, 6, 6, 6, 6, 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 6, 6, 7, 7, 7, 6, 6, 6, 6, 7, 6, 7, 7, 7, 7, 7, 6, 6, 6, 6, 7, 6, 7, 7, 6, 6, 6, 6, 7, 6, 7, 6, 6, 7, 6, 7, 7, 7, 6, 6, 6, 7, 6, 7, 7, 7, 6, 6, 6, 6, 6, 7, 6, 6, 6, 7, 7, 6, 7, 7, 6, 7, 7, 6, 7, 6, 6, 7, 7, 6, 7, 6, 7, 7, 6, 6, 7, 7, 6, 6, 7
Offset: 0

Views

Author

Keywords

Comments

From Robert Israel, Mar 30 2018: (Start)
a(0)=6. If the concatenation 6a(n)...a(0) (as a decimal number) is divisible by 2^(n+2) then a(n+1)=6, otherwise a(n+1)=7.
Pomerance (see link) shows the sequence is not eventually periodic. (End)

Crossrefs

Programs

  • Maple
    a[0]:= 6: v:= 6:
    for n from 1 to 100 do
      if 6*10^n+v mod 2^(n+1)=0 then a[n]:= 6 else a[n]:= 7 fi;
      v:= v + a[n]*10^n
    od:
    seq(a[i],i=0..100); # Robert Israel, Mar 30 2018

A053380 a(n) contains n digits (either '8' or '9') and is divisible by 2^n.

Original entry on oeis.org

8, 88, 888, 9888, 89888, 989888, 9989888, 89989888, 989989888, 8989989888, 98989989888, 898989989888, 8898989989888, 98898989989888, 998898989989888, 8998898989989888, 98998898989989888, 898998898989989888
Offset: 1

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Formula

a(n)=a(n-1)+10^(n-1)*(8+[a(n-1)/2^(n-1) mod 2]) i.e. a(n) ends with a(n-1); if (n-1)-th term is divisible by 2^n then n-th term begins with an 8, if not then n-th term begins with a 9.
Showing 1-4 of 4 results.