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-3 of 3 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

A158624 Upper limit of backward value of 5^n.

Original entry on oeis.org

5, 2, 6, 5, 6, 7, 9, 5, 7, 8, 7, 9, 6, 9, 9, 7, 6, 5, 7, 8, 8, 5, 5, 7, 6, 9, 7, 5, 9, 9, 5, 7, 8, 9, 5, 8, 6, 7, 7, 5, 6, 5, 6, 9, 5, 7, 5, 6, 6, 9, 6, 7, 7, 6, 7, 6, 8, 8, 5, 8, 5, 6, 7, 5, 8, 9, 6, 6, 7, 5, 9, 5, 7, 9, 8, 6, 8, 8, 7, 9, 5, 8, 8, 5, 8, 5, 9, 5, 5, 8, 9, 7, 7, 9, 7, 7, 9, 6, 7, 6, 8, 9, 7, 6, 6
Offset: 0

Views

Author

Simon Plouffe, Mar 23 2009

Keywords

Comments

Digits are all in {5,6,7,8,9} after 2nd term.
The other limit, related to odd n, is in A158625.
The first digit of the backward value of 5^n is always a(0)=5. The second digit is a(-1)=2 from n=2 on. The third digit is a(-2)=6 for all even n >= 4. The fourth digit is a(-3)=5 for n=6+4k, k >= 0. The fifth digit is a(-4)=6 for n=10+8k, k >= 0. The 6th digit is a(-5)=7 for n=10+16k, k >= 0. The 7th digit is a(-6)=9 for n=10+32k, k >= 0.

Examples

			5^3 = 125 so the backward value is 0.521, 5^10 = 9765625, so the backward value is 0.5265679. The upper limit of all values is a constant, which appears to be 0.5265679578796997657885576975995789586775656...
		

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 lt 5 then e+:=2^(d-2); end if; end for; t:=Modexp(5, e, 10^D); IntegerToSequence(t, 10); // Jon E. Schoenfield, Feb 07 2018
  • Maple
    A158624:= proc(N)
    local m,n,A;
    m[2]:= 3;
    for n from 3 to N do
      A:= 5&^m[n-1] mod 10^n;
      if A > 5*10^(n-1) then m[n]:= m[n-1]
      else m[n]:= m[n-1]+2^(n-3)
      end if
    end do:
    convert(5&^m[N] mod 10^(N),base,10);
    end proc; # Robert Israel, Apr 01 2012
  • Mathematica
    A158624[k_] := Module[{m, n, a}, m[2] = 3; For[n = 3, n <= k, n++, a = PowerMod[5, m[n-1], 10^n]; If[ a > 5*10^(n-1), m[n] = m[n-1], m[n] = m[n-1] + 2^(n-3)]]; IntegerDigits[PowerMod[5, m[k], 10^k]] // Reverse]; A158624[105] (* Jean-François Alcover, Dec 21 2012, translated from Robert Israel's Maple program *)

A158626 a(n) = 42*n^2 - 1.

Original entry on oeis.org

41, 167, 377, 671, 1049, 1511, 2057, 2687, 3401, 4199, 5081, 6047, 7097, 8231, 9449, 10751, 12137, 13607, 15161, 16799, 18521, 20327, 22217, 24191, 26249, 28391, 30617, 32927, 35321, 37799, 40361, 43007, 45737, 48551, 51449, 54431, 57497, 60647, 63881, 67199, 70601
Offset: 1

Views

Author

Vincenzo Librandi, Mar 23 2009

Keywords

Comments

The identity (42*n^2-1)^2 - (441*n^2-21)*(2*n)^2 = 1 can be written as a(n)^2-A145678(n)*A005843(n)^2 = 1. - Vincenzo Librandi, Feb 16 2012

Crossrefs

Programs

  • Magma
    I:=[41, 167, 377]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 16 2012
    
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {41, 167, 377}, 50] (* Vincenzo Librandi, Feb 16 2012 *)
  • PARI
    for(n=1, 40, print1(42*n^2-1", ")); \\ Vincenzo Librandi, Feb 16 2012

Formula

G.f.: x*(-41-44*x+x^2)/(x-1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
From Amiram Eldar, Mar 16 2023: (Start)
Sum_{n>=1} 1/a(n) = (1 - cot(Pi/sqrt(42))*Pi/sqrt(42))/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (cosec(Pi/sqrt(42))*Pi/sqrt(42) - 1)/2. (End)

Extensions

Edited by R. J. Mathar, Jul 26 2009
A-number updated by R. J. Mathar, Oct 16 2009
Showing 1-3 of 3 results.