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-6 of 6 results.

A005054 a(0) = 1; a(n) = 4*5^(n-1) for n >= 1.

Original entry on oeis.org

1, 4, 20, 100, 500, 2500, 12500, 62500, 312500, 1562500, 7812500, 39062500, 195312500, 976562500, 4882812500, 24414062500, 122070312500, 610351562500, 3051757812500, 15258789062500, 76293945312500, 381469726562500, 1907348632812500, 9536743164062500
Offset: 0

Views

Author

Keywords

Comments

Consider the sequence formed by the final n decimal digits of {2^k: k >= 0}. For n=1 this is 1, 2, 4, 8, 6, 2, 4, ... (A000689) with period 4. For any n this is periodic with period a(n). Cf. A000855 (n=2), A126605 (n=3, also n=4). - N. J. A. Sloane, Jul 08 2022
First differences of A000351.
Length of repeating cycle of the final n+1 digits in Fermat numbers. - Lekraj Beedassy, Robert G. Wilson v and Eric W. Weisstein, Jul 05 2004
Number of n-digit endings for a power of 2 whose exponent is greater than or equal to n. - J. Lowell
For n>=1, a(n) is equal to the number of functions f:{1,2,...,n}->{1,2,3,4,5} such that for a fixed x in {1,2,...,n} and a fixed y in {1,2,3,4,5} we have f(x) != y. - Aleksandar M. Janjic and Milan Janjic, Mar 27 2007
Equals INVERT transform of A033887: (1, 3, 13, 55, 233, ...) and INVERTi transform of A001653: (1, 5, 29, 169, 985, 5741, ...). - Gary W. Adamson, Jul 22 2010
a(n) = (n+1) terms in the sequence (1, 3, 4, 4, 4, ...) dot (n+1) terms in the sequence (1, 1, 4, 20, 100, ...). Example: a(4) = 500 = (1, 3, 4, 4, 4) dot (1, 1, 4, 20, 100) = (1 + 3 + 16, + 80 + 400), where (1, 3, 16, 80, 400, ...) = A055842, finite differences of A005054 terms. - Gary W. Adamson, Aug 03 2010
a(n) is the number of compositions of n when there are 4 types of each natural number. - Milan Janjic, Aug 13 2010
Apart from the first term, number of monic squarefree polynomials over F_5 of degree n. - Charles R Greathouse IV, Feb 07 2012
For positive integers that can be either of two colors (designated by ' or ''), a(n) is the number of compositions of 2n that are cardinal palindromes; that is, palindromes that only take into account the cardinality of the numbers and not their colors. Example: 3', 2'', 1', 1, 2', 3'' would count as a cardinal palindrome. - Gregory L. Simay, Mar 01 2020
a(n) is the length of the period of the sequence Fibonacci(k) (mod 5^(n-1)) (for n>1) and the length of the period of the sequence Lucas(k) (mod 5^n) (Kramer and Hoggatt, 1972). - Amiram Eldar, Feb 02 2022

References

  • T. Koshy, "The Ends Of A Fermat Number", pp. 183-4 Journal Recreational Mathematics, vol. 31(3) 2002-3 Baywood NY.

Crossrefs

Programs

  • Magma
    [(4*5^n+0^n)/5: n in [0..30]]; // Vincenzo Librandi, Jun 08 2013
    
  • Maple
    a:= n-> ceil(4*5^(n-1)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 08 2022
  • Mathematica
    CoefficientList[Series[(1 - x) / (1 - 5 x), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 08 2013 *)
  • PARI
    Vec((1-x)/(1-5*x) + O(x^100)) \\ Altug Alkan, Dec 07 2015

Formula

a(n) = (4*5^n + 0^n) / 5. - R. J. Mathar, May 13 2008
G.f.: (1-x)/(1-5*x). - Philippe Deléham, Nov 02 2009
G.f.: 1/(1 - 4*Sum_{k>=1} x^k).
a(n) = 5*a(n-1) for n>=2. - Vincenzo Librandi, Dec 31 2010
a(n) = phi(5^n) = A000010(A000351(n)).
E.g.f.: (4*exp(5*x)+1)/5. - Paul Barry, Apr 20 2003
a(n + 1) = (((1 + sqrt(-19))/2)^n + ((1 - sqrt(-19))/2)^n)^2 - (((1 + sqrt(-19))/2)^n - ((1 - sqrt(-19))/2)^n)^2. - Raphie Frank, Dec 07 2015

Extensions

Better definition from R. J. Mathar, May 13 2008
Edited by N. J. A. Sloane, Jul 08 2022

A362468 Number of distinct n-digit suffixes generated by iteratively multiplying an integer by 4, where the initial integer is 1.

Original entry on oeis.org

3, 11, 52, 252, 1253, 6253, 31254, 156254, 781255, 3906255, 19531256, 97656256, 488281257, 2441406257, 12207031258, 61035156258, 305175781259, 1525878906259, 7629394531260, 38146972656260, 190734863281261, 953674316406261, 4768371582031262, 23841857910156262
Offset: 1

Views

Author

Gil Moses, Apr 21 2023

Keywords

Comments

This process produces a family of similar sequences when using different constant multipliers. See crossrefs below.

Examples

			For n = 2, we begin with 1, iteratively multiply by 4 and count the number of terms before the last 2 digits begin to repeat. We obtain 1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, ... . The next term is 4194304, which repeats the last 2 digits 04. Thus, the number of distinct terms is a(2) = 11.
		

Crossrefs

Period of powers mod 10^n: A020699 (4), A216099 (3), A216164 (7), A216156 (11).

Programs

  • PARI
    a(n)=(n+1)\2*2*5^(n-1) \\ Charles R Greathouse IV, Apr 28 2023
  • Python
    def a(n):
        s, x, M = set(), 1, 10**n
        while x not in s: s.add(x); x = (x<<2)%M
        return len(s), x
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Apr 22 2023
    
  • Python
    def A362468(n): return (n+1>>1)+(5**(n-1)<<1) # Chai Wah Wu, Apr 24 2023
    

Formula

a(n) = t + k, where t = A004526(n+1) and k = A020699(n), since 4^t == 4^(t+k) (mod 10^n). Here, t is the "transient" portion and k = ord_5^n(4), the multiplicative order of 4 modulo 5^n, is the period of the orbit. - Michael S. Branicky, Apr 22 2023

Extensions

a(13) and beyond from Michael S. Branicky, Apr 22 2023

A216156 Period of powers of 11 mod 10^n.

Original entry on oeis.org

10, 50, 500, 5000, 50000, 500000, 5000000, 50000000, 500000000, 5000000000, 50000000000, 500000000000, 5000000000000, 50000000000000, 500000000000000, 5000000000000000, 50000000000000000, 500000000000000000
Offset: 1

Views

Author

V. Raman, Sep 02 2012

Keywords

Comments

Essentially the same as A093143. - R. J. Mathar, Sep 06 2012
Also period of squares mod 10^n. - Mohammed Yaseen, Apr 18 2023

Examples

			a(2) = 50 because 11^50 = 11739085287969531650666649599035831993898213898723001 = 1 mod 1000.
		

Crossrefs

Programs

  • Mathematica
    Join[{10}, NestList[10*# &, 50, 20]] (* Paolo Xausa, Feb 20 2024 *)

Formula

a(n) = 5*10^(n-1), n >= 2.

A216164 Period of powers of 7 mod 10^n.

Original entry on oeis.org

4, 4, 20, 100, 500, 5000, 50000, 500000, 5000000, 50000000, 500000000, 5000000000, 50000000000, 500000000000, 5000000000000, 50000000000000, 500000000000000, 5000000000000000, 50000000000000000, 500000000000000000
Offset: 1

Views

Author

V. Raman, Sep 02 2012

Keywords

Comments

Essentially the same as A216099.

Crossrefs

Programs

  • Mathematica
    Join[{4, 4, 20, 100}, NestList[10*# &, 500, 20]] (* Paolo Xausa, Feb 19 2024 *)

Formula

a(n) = 4*5^(n-2), 1 < n < 5.
a(n) = 5*10^(n-3), n >= 5.
a(n) = 2^(n-3)*5^(n-2) for n>4. a(n) = 10*a(n-1) for n>5. G.f.: 4*x*(125*x^4 +25*x^3 +5*x^2 +9*x -1) / (10*x -1). - Colin Barker, Sep 22 2013

A243911 Least number k such that n^k ends in two identical digits, or 0 if no such number exists.

Original entry on oeis.org

18, 0, 9, 0, 0, 0, 6, 0, 2, 1, 2, 17, 3, 0, 0, 11, 0, 5, 2, 0, 1, 0, 0, 0, 0, 0, 14, 0, 2, 7, 0, 1, 7, 0, 0, 7, 2, 5, 2, 0, 3, 0, 1, 0, 0, 0, 9, 0, 2, 0, 18, 3, 9, 1, 0, 0, 6, 5, 2, 0, 2, 0, 3, 0, 1, 0, 0, 0, 2, 3, 7, 11, 0, 0, 0, 1, 14, 5, 2, 0, 0, 0, 7, 0, 0, 0, 1, 0, 2, 9, 3, 0, 11
Offset: 2

Views

Author

Derek Orr, Jun 14 2014

Keywords

Comments

For all n > 1, the 2-digit ending of n^k repeats itself after a certain k-value. Thus a(n) = 0 is definite.
a(10*n) = 2 for all n > 0. Thus there are infinitely many nonzero entries. a(5^n) = 0 for all n > 0. Thus there are infinitely many zero entries.

Examples

			2^18 = 262144 ends in two of the same digit. Thus a(2) = 18.
		

Crossrefs

Programs

  • Python
    def b(n,p):
      lst = []
      count = 0
      lst1 = []
      for i in range(1,5**(n+2)):
        st = str(p**i)
        if len(st) >= n:
          if int(st[len(st)-n:len(st)]) not in lst:
            lst.append(int(st[len(st)-n:len(st)]))
            lst1.append(i)
          else:
            return len(lst)+min(lst1)
    def a(p):
      for i in range(1,b(2,p)+2):
        st = str(p**i)
        if int(st[len(st)-2:len(st)])%11==0:
          return i
    p = 2
    while p < 100:
      if a(p):
        print(a(p),end=', ')
      else:
        print(0,end=', ')
      p += 1

A352378 Irregular triangle read by rows: T(n,k) is the (n-th)-to-last digit of 2^p such that p == k + A123384(n-1) (mod A005054(n)); k >= 0.

Original entry on oeis.org

2, 4, 8, 6, 1, 3, 6, 2, 5, 1, 2, 4, 9, 9, 8, 6, 3, 7, 4, 8, 7, 5, 0, 0, 1, 2, 5, 0, 0, 0, 1, 3, 7, 5, 0, 1, 2, 5, 1, 3, 6, 2, 4, 8, 7, 4, 9, 8, 6, 2, 5, 1, 3, 7, 4, 9, 8, 7, 5, 1, 2, 4, 8, 6, 3, 6, 3, 6, 2, 4, 9, 9, 9, 9, 8, 7, 4, 9, 9, 9, 8, 6, 2, 4, 9, 8, 7, 4, 8, 6, 3, 7, 5, 1, 2, 5, 0, 1, 3, 7, 4, 8, 6, 2, 5, 0, 1
Offset: 1

Views

Author

Davis Smith, Mar 14 2022

Keywords

Comments

The n-th row of this triangle is the cycle of the (n-th)-to-last digit of powers of 2.
The period of the last n digits of powers of 2 where the exponent is greater than or equal to n is A005054(n). As a result, this triangle can be used to get the (n-th)-to-last digit of a large power of 2; if p == k + A123384(n-1) (mod A005054(n)), then the (n-th)-to-last digit (base 10) of 2^p is T(n,k). For example, for n = 1, if p == 1 (mod 4), then 2^p == 2 (mod 10) and if p == 3 (mod 4), then 2^p == 8 (mod 10). For n = 2, if p == 4 (mod 20), then the second-to-last digit of 2^p (base 10) is 1 and if p == 7 (mod 20), then the second-to-last digit of 2^p (base 10) is 2.

Examples

			Irregular triangle begins:
n/k| 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... | Number of terms:
---+---------------------------------------+-----------------
1  | 2, 4, 8, 6;                           |                4
2  | 1, 3, 6, 2, 5, 1, 2, 4, 9, 9,  8, ... |               20
3  | 1, 2, 5, 0, 0, 0, 1, 3, 7, 5,  0, ... |              100
4  | 1, 2, 4, 8, 6, 2, 5, 1, 2, 4,  8, ... |              500
5  | 1, 3, 6, 3, 6, 2, 4, 9, 9, 8,  7, ... |             2500
6  | 1, 2, 5, 0, 0, 1, 3, 7, 5, 1,  2, ... |            12500
...
		

Crossrefs

The (n-th)-to-last digit of a power of 2: A000689 (n=1), A160590 (n=2).

Programs

  • PARI
    A352378_rows(n)=my(N=logint(10^(n-1),2),k=4*5^(n-1)); vector(k,v,floor(lift(Mod(2,10^n)^(v+N))/(10^(n-1))))

Formula

For n > 1, T(n,0) = 1.
Showing 1-6 of 6 results.