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

A126933 Quotients arising from sequence A053312.

Original entry on oeis.org

1, 3, 14, 132, 691, 1908, 16579, 47352, 414301, 1183713, 5474669, 27151397, 135646011, 678174568, 6442602909, 18480090517, 85533990571, 424236721848, 4026815626549, 11550150977337, 53458791308981, 265147974756053, 1324666882885839, 6622797918981982, 62916043734881616, 329481245744393933
Offset: 1

Views

Author

Gerry Leversha, Mar 18 2007

Keywords

Comments

Take the decimal number formed by the first n digits of A023396 in reverse order and divide by 2^n.
The sequence A053312 gives n-digit numbers consisting entirely of 1s and 2s which are divisible by 2^n. The quotients upon division form the present sequence. The parity of the n-th term here determines the next term in A023396; if odd, it is a 1 and if even, a 2.
This was set as a problem in the All Union Mathematical Olympiad of 1971 and can be found in the reference cited here.

Examples

			a(4) = A053312(4) / 2^4 = 2112 / 16 = 132. - _David A. Corneth_, Jun 11 2020
		

References

  • J. B. Tabov and P. J. Taylor, Methods of Problem Solving, Book 1, Australian Mathematics Trust, 1996.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A126933_gen(): # generator of terms
        a, b = 2, 10
        for n in count(1):
            a+=b if (c:=a>>n)&1 else b<<1
            b *= 10
            yield c
    A126933_list = list(islice(A126933_gen(),20)) # Chai Wah Wu, Mar 16 2023

Formula

a(n) < 0.3 * 5^n. - David A. Corneth, Jun 11 2020

Extensions

Name changed and other minor edits by Ray Chandler, Jun 17 2020

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

Original entry on oeis.org

2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Keywords

Examples

			2^1 ends in 2;
2^5 ends in 32;
2^9 ends in 512;
2^13 ends in 8192;
2^89 ends in ...562112.
There exists a power of two ending in 12, so for n = 3 the choice for a(3) = 1 or a(3) = 2 comes from the existence of a power of two ending in either 112 or 212. As 112 is divisible by 2^n = 8 (and 212 is not) a(3) = 1. - _David A. Corneth_, Jun 11 2020
		

Crossrefs

Programs

  • PARI
    first(n) = my(f = 2, pow10 = 1, pow2 = 2); { for(i = 2, n, pow10*=10; pow2<<=1; c1 = pow10 + f; if(c1 % pow2 == 0, f = c1, c2 = 2*pow10 + f; if(c2 % pow2 == 0, f = c2 ) ) ); Vecrev(digits(f)) } \\ David A. Corneth, Jun 11 2020

Extensions

Definition corrected by Gerry Leversha, Mar 17 2007

A140288 The least n-digit multiple of 5^n using the decimal digits {1, 2, 3, 4, 5} exclusively.

Original entry on oeis.org

5, 25, 125, 3125, 53125, 453125, 4453125, 14453125, 314453125, 2314453125, 22314453125, 122314453125, 4122314453125, 44122314453125, 444122314453125, 4444122314453125, 54444122314453125, 254444122314453125, 1254444122314453125, 21254444122314453125
Offset: 1

Views

Author

Michel Criton (mcriton(AT)wanadoo.fr), May 24 2008

Keywords

Examples

			a(5) = 53125 = 17 * 5^5.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {v = vector(nn); v[1] = 5; for(k = 2, nn, j = 1; while((j*10^(k-1) + v[k-1]) % 5^k > 0, j++); v[k] = j*10^(k-1) + v[k-1]); for(k = 1, nn, print1(v[k], ", "));} \\ Jinyuan Wang, Aug 27 2019

Formula

To obtain the (n+1)-th term, write the n-th term as k * 5^n. Multiply k by a multiple of 2^n to get a multiple of 5. Add the multiplicator of 2^n to the left of the n-th term.

Extensions

More terms from Alois P. Heinz, Apr 05 2017

A207778 Smallest multiple of 2^n using only 1's and 2's.

Original entry on oeis.org

1, 2, 12, 112, 112, 2112, 2112, 122112, 122112, 12122112, 12122112, 12122112, 111212122112, 1111212122112, 11111212122112, 11111212122112, 11111212122112, 11111212122112, 111211111212122112, 111211111212122112, 111211111212122112, 111211111212122112
Offset: 0

Views

Author

Lekraj Beedassy, Feb 20 2012

Keywords

Comments

An induction-based argument can be used to show that this sequence is actually infinite.
Problem 1, proposed during the 5th All-Soviet-Union Mathematical Competition in 1971 at Riga (Pertsel link), asks for a proof that this sequence is infinite. - Bernard Schott, Mar 20 2023

References

  • J. B. Tabov and P. J. Taylor, Methods of Problem Solving, Book 1, Australian Mathematics Trust, 1996.

Crossrefs

Programs

  • Mathematica
    Table[m = 1; p = 2^k; While[Total@ DigitCount[m p][[3 ;; -1]] > 0, m++]; m p, {k, 0, 11}] (* Michael De Vlieger, Mar 17 2023 *)
  • PARI
    a(n) = my(k=1, d=digits(k*2^n)); while (!((vecmin(d)>=1) && (vecmax(d)<=2)), k++; d=digits(k*2^n)); k*2^n; \\ Michel Marcus, Mar 15 2023

Formula

a(n) <= A053312(n).

Extensions

More terms from Alois P. Heinz, Feb 20 2012

A147884 a(n) is the smallest positive integer k such that the last n digits of 2^k are 1 or 2.

Original entry on oeis.org

1, 9, 89, 89, 589, 3089, 3089, 3089, 315589, 315589, 8128089, 164378089, 945628089, 1922190589, 11687815589, 109344065589, 231414378089, 1452117503089, 4503875315589, 65539031565589, 141832976878089, 1667711883128089, 3575060515940589
Offset: 1

Views

Author

Max Alekseyev, Nov 17 2008

Keywords

Crossrefs

Programs

  • PARI
    { m=2; for(n=1,50, print1(znlog(m,Mod(2,5^n)),", "); m+=10^n; if(m%(2^(n+1)), m+=10^n); ) }
    
  • Python
    from itertools import count, islice
    from sympy import discrete_log
    def A147884_gen(): # generator of terms
        a, b, c = 0, 1, 1
        for n in count(0):
            a+=b*c if (a>>n)&1 else b*c<<1
            c *= 5
            yield int(discrete_log(c,a,2))
            b <<= 1
    A147884_list = list(islice(A147884_gen(),20)) # Chai Wah Wu, Mar 16 2023

Formula

a(n) = the smallest degree k such that 2^k == A053312(n) (mod 5^n).

Extensions

Extended by Minfeng Wang, Dec 15 2024

A241882 Numbers with d digits that are divisible by 2^d and have at most 2 distinct digits: exactly one even digit and at most one odd digit.

Original entry on oeis.org

2, 4, 6, 8, 12, 16, 32, 36, 44, 52, 56, 72, 76, 88, 92, 96, 112, 144, 232, 272, 336, 344, 544, 552, 616, 656, 696, 744, 776, 888, 944, 992, 1616, 1888, 2112, 2272, 2992, 3232, 3344, 3888, 4144, 4544, 4944, 5552, 5888, 6336, 6656, 7744, 7776, 7888, 9696, 9888
Offset: 1

Views

Author

J. Lowell, Apr 30 2014

Keywords

Comments

Union of 20 different sequences, all of which are defined as "a(n) contains n digits (either [any odd digit] or [any nonzero even digit] and is divisible by 2^n)."
Subsequence of A050622. - Michel Marcus, May 07 2014

Examples

			24 is not in the sequence because it has distinct even digits.
		

Crossrefs

Cf. A035014, A053312-A053318, A053332-A053338, A053376-A053380 (sequences whose union is this sequence).

Programs

  • PARI
    isok(n) = {digs = digits(n); d = #digs; if (n % 2^d, return (0)); sd = Set(digs); if (#sd > 2, return (0)); if (#sd < 2, return (1)); ((sd[1] % 2) + (sd[2] % 2)) == 1;} \\ Michel Marcus, May 02 2014

Extensions

More terms from Michel Marcus, May 02 2014

A284924 a(n) is the least n-digit multiple of 5^n using the decimal digits {5, 6, 7, 8, 9} exclusively.

Original entry on oeis.org

5, 75, 875, 6875, 96875, 796875, 6796875, 66796875, 966796875, 5966796875, 65966796875, 865966796875, 8865966796875, 68865966796875, 868865966796875, 8868865966796875, 78868865966796875, 578868865966796875, 7578868865966796875, 87578868865966796875
Offset: 1

Views

Author

J. Lowell, Apr 05 2017

Keywords

Examples

			a(2) = 75 because 75 is divisible by 5^2 (25*3=75) and uses only digits in the 5-9 interval.
		

Crossrefs

Extensions

More terms from Alois P. Heinz, Apr 06 2017

A342932 The unique sequence {a(1), a(2), a(3), a(4), ...} of digits 1, 2, or 3 such that the number a(n)a(n-1)...a(2)a(1), read in base 6, is divisible by 3^n.

Original entry on oeis.org

3, 1, 2, 3, 3, 1, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 1, 3, 3, 3, 2, 3, 3, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 3, 3, 2, 2, 3, 1, 3, 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2, 3, 2, 2, 1, 2, 1, 3, 2, 2, 3, 1, 1, 1, 1, 1, 3, 2, 2, 2, 3, 3, 2, 1, 3, 1, 1, 2, 2, 3, 1, 3, 2, 3, 2, 3, 1, 1, 3, 1, 2, 3, 3, 2, 3, 2, 3, 1, 1, 2, 3
Offset: 1

Views

Author

Eugen Ionascu, Mar 29 2021

Keywords

Comments

The distribution seems to be uniform but random (empirical observation).
To prove that such a digit sequence exists and is unique is a good (but uncommon) example of a proof by induction.

Examples

			3 is divisible by 3^1;
13_6 = 1*6 + 3 = 9, which is divisible by 3^2,
213_6 = 2*6^2 + 1*6 + 3 = 81, which is divisible by 3^3.
		

Crossrefs

Programs

  • Mathematica
    nd[n_] := Module[{k, i, s, ss, L, a}, L = Array[f, n]; f[1] = 3;
      Do[s = Sum[6^(k - 1)*f[k], {k, 1, i - 1}];
       ss = Mod[2^(i - 1)*s/3^(i - 1), 3];
       If[ss == 0, f[i] = 3, If[ss == 1, f[i] = 2, f[i] = 1]], {i, 2, n}];
      s = Sum[6^(k - 1)*f[k], {k, 1, n}];
      {L, s/3^n}]
  • PARI
    { q=0; t=1; for (n=1, 105, print1 (d=[3,1,2][1+lift(-q/Mod(t,3))]", "); q=(t*d+q)/3; t*=2) } \\ Rémy Sigrist, Apr 15 2021
  • Python
    n, div, divnum = 0, 1, 0
    while n < 87:
        div, a = 3*div, 1
        while (a*6**n+divnum)%div != 0:
            a = a+1
        divnum, n = divnum+a*6**n, n+1
        print(a, end=', ') # A.H.M. Smeets, Apr 13 2021
    
Showing 1-8 of 8 results.