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

A306544 Any positive integer n has a smallest multiple consisting of a succession of 1's followed by a succession of 0's (A052983). This multiple is regarded as a binary number and a(n) is its conversion to base 10.

Original entry on oeis.org

2, 2, 14, 4, 2, 14, 126, 8, 1022, 2, 6, 28, 126, 126, 14, 16, 131070, 1022, 524286, 4, 126, 6, 8388606, 56, 4, 126, 268435454, 252, 536870910, 14, 65534, 32, 126, 131070, 126, 2044, 14, 524286, 126, 8, 62, 126, 4194302, 12, 1022, 8388606, 140737488355326, 112, 8796093022206
Offset: 1

Views

Author

Bernard Schott, Feb 22 2019

Keywords

Comments

For any odd number m not divisible by 5 (A045572), Euler's theorem (lcm(9*m,10) = 1, so 10^phi(9*m) == 1 (mod 9*m); i.e., 9*m | 10^d - 1 = 9*R_d with d = phi(9*m)) guarantees that the repunit R_d is always some multiple of m.
The numbers of the form 2^i*5^j with i, j >= 0 (A003592) clearly have a multiple equal to 10^r, for r = max(i,j).
These multiples of n end in a string of one or more 0's, so all the terms of this sequence are even.
The powers 2^k are fixed points of this sequence: the smallest multiple of 2^k consisting of a succession of 1's followed by a succession of 0's is 10^k, and 10^k in base 2 is 2^k in base 10.

Examples

			The smallest multiple of the integer 7 consisting of a succession of 1's followed by a succession of 0's is 1111110, and 1111110_2 = 126_10, so a(7) = 126. This is also the case for n=13, 14, 21, 26, 33, 35, 37, ...
		

Crossrefs

Extensions

More terms from Michel Marcus, Feb 28 2019

A276348 a(n) = the smallest number k such that k*n is a number with a string of 1's followed by a string of 0's.

Original entry on oeis.org

10, 5, 370, 25, 2, 185, 158730, 125, 123456790, 1, 10, 925, 85470, 79365, 74, 625, 653594771241830, 61728395, 58479532163742690, 5, 52910, 5, 483091787439613526570, 4625, 4, 42735, 41152263374485596707818930, 396825, 383141762452107279693486590, 37
Offset: 1

Views

Author

Jaroslav Krizek, Aug 30 2016

Keywords

Comments

a(n) = the smallest number k such that k*n is a number from A276349.
a(n) > 0 for all n.

Examples

			For n=3; 3*370 = 1110 (term of A276349).
		

References

  • L. Pick, Dirichletovy šuplíčky. Pokroky matematiky, fyziky & astronomie; 2 (2016), 106-118. (In Czech; The Dirichlet pigeonhole principle)

Crossrefs

Programs

  • Magma
    a:=10; S:=[a]; for n in [2..6] do k:=0; flag:= true; while flag do k+:=1; if [k*n] subset [n: n in [1..10000] | Seqint(Setseq(Set(Sort(Intseq(n))))) eq 10 and Seqint(Sort((Intseq(n)))) eq n] then Append(~S, k); a:=k; flag:=false; end if; end while; end for; S;
  • Maple
    f:= proc(n) local b,c,d,m,q;
        b:= padic:-ordp(n,2); c:= padic:-ordp(n,5); if b+c=0 then d:= 1 else d:= max(b,c) fi; m:= n/2^b/5^c; q:= numtheory:-order(10,9*m);
         2^(d-b)*5^(d-c)*(10^q-1)/(9*m)
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 30 2016
  • Mathematica
    Table[k = 1; While[! If[Length@ # == 2, Flatten@ Map[Union, #] == {1, 0}, False] &@ Split@ IntegerDigits[k n], k++]; k, {n, 8}] (* Michael De Vlieger, Aug 30 2016 *)

Formula

a(n) = A052983(n)/n.
From Robert Israel, Aug 30 2016: (Start)
Let n = 2^b*5^c*m where GCD(m,10)=1, and q = A084680(9*m).
If b=c=0 let d=1, otherwise d=max(b,c).
Then a(n) = 2^(d-a)*5^(d-b)*(10^q-1)/(9*m). (End)

A074157 Smallest multiple of n which uses no digits of n, or 0 if no such number exists.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 22, 36, 26, 28, 30, 32, 34, 36, 38, 0, 63, 44, 46, 96, 100, 78, 54, 56, 58, 0, 62, 64, 66, 68, 70, 72, 111, 76, 78, 0, 82, 168, 86, 88, 90, 92, 188, 96, 588, 0, 204, 104, 106, 108, 110, 112, 114, 116, 118, 0, 244, 310, 189, 128
Offset: 1

Views

Author

Amarnath Murthy, Aug 29 2002

Keywords

Comments

For numbers n of the form 10k, of the form 10k+5 with a zero somewhere, and those using all 10 digits, a(n) = 0.
Are there numbers using 8 of the 9 nonzero digits for which a(n) is nonzero? If so, what is the smallest such number?
All such numbers have a(n) nonzero since a candidate value for a(n) is d*A052983(n) where d is the nonzero digit not in n. - Gonzalo Martínez, Dec 12 2024

Crossrefs

Programs

  • PARI
    a(n) = if(!(n%10), return(0)); my(dn = Set(digits(n))); if(#dn==10 || (#dn==9 && dn[1]==1), return(0)); if(!(n%5) && !dn[1], return(0)); if(!(n%2), my(v=setminus([0, 2, 4, 6, 8], dn)); if(!#v || (#v==1 && #dn==9 && valuation(n, 2)>valuation(v[1], 2)) || (v==[2, 6] && #dn==8 && valuation(n, 2)>1), return(0))); forstep(m=2*n, oo, n, if(!#setintersect(Set(digits(m)), dn), return(m))); \\ Michel Marcus, Aug 04 2017 (Corrected by Jinyuan Wang, Jun 15 2025)

Extensions

a(24) and a(49) corrected by Michel Marcus, Aug 04 2017

A276349 Numbers consisting of a nonempty string of 1's followed by a nonempty string of 0's.

Original entry on oeis.org

10, 100, 110, 1000, 1100, 1110, 10000, 11000, 11100, 11110, 100000, 110000, 111000, 111100, 111110, 1000000, 1100000, 1110000, 1111000, 1111100, 1111110, 10000000, 11000000, 11100000, 11110000, 11111000, 11111100, 11111110, 100000000, 110000000, 111000000
Offset: 1

Views

Author

Jaroslav Krizek, Aug 30 2016

Keywords

Comments

Intersection of A037415 and A009996 except for 1 [Corrected by David A. Corneth, Aug 30 2016].
Set of terms from sequence A052983.
a(n) is the binary expansion of A043569(n). - Michel Marcus, Sep 04 2016

Examples

			60 is of the form binomial(a, 2) + b where 0 < b <= a and a = 11, b = 5. So a(60) has (11 + 1) digits and 5 leading ones. The other digits are 0. Giving a(60) = 111110000000. It has 7 (more than 1) trailing zeros so the next one, a(61) is a(60) + 10^(7 - 1). - _David A. Corneth_, Aug 30 2016
		

Crossrefs

Programs

  • Magma
    [n: n in [1..10^7] | Seqint(Setseq(Set(Sort(Intseq(n))))) eq 10 and Seqint(Sort((Intseq(n)))) eq n];
    
  • Maple
    seq(seq(10^(m+1)*(1-10^(-j))/9,j=1..m),m=1..20); # Robert Israel, Sep 02 2016
  • Mathematica
    Table[FromDigits@ Join[ConstantArray[1, #1], ConstantArray[0, #2]] & @@@ Transpose@ {#, n - #} &@ Range[n - 1], {n, 2, 9}] // Flatten (* Michael De Vlieger, Aug 30 2016 *)
    Flatten[Table[FromDigits[Join[PadRight[{},n,1],PadRight[{},k,0]]],{n,8},{k,8}]]//Sort (* Harvey P. Dale, Jan 09 2019 *)
  • PARI
    is(n) = vecmin(digits(n))==0 && vecmax(digits(n))==1 && digits(n)==vecsort(digits(n), , 4) \\ Felix Fröhlich, Aug 30 2016
    
  • PARI
    a(n) = my(r =  ceil((sqrt(1+8*n)+1)/2), k = n - binomial(r-1, 2));10^(r-k)*(10^(k)-1)/9
    \\ given an element n, computes the next element of the sequence.
    nxt(n) = my(d = digits(n), qd=#d, s = vecsum(d)); if(qd-s>1, n+10^(qd-s-1), 10^qd)
    \\ given an element n of the sequence, computes its place in the sequence.
    inv(n) = my(d = digits(n)); binomial(#d-1,2) + vecsum(d) \\ David A. Corneth, Aug 31 2016
    
  • Python
    from math import isqrt, comb
    def A276349(n): return 10*(10**(m:=isqrt(n<<3)+1>>1)-10**(comb(m+1,2)-n))//9 # Chai Wah Wu, Jun 16 2025

Formula

A227362(a(n)) = 10.
From Robert Israel, Sep 02 2016: (Start)
a((m^2-m)/2+j) = 10^(m+1)*(1-10^(-j))/9 for m>=1, 1<=j<=m.
a(n) = 10*(10^m - 10^(-n+m*(m+1)/2))/9 where m = A002024(n). (End)
A002275(A002260(n)) * 10^A004736(n) - Peter Kagey, Sep 02 2016
Sum_{n>=1} 1/a(n) = A073668. - Amiram Eldar, Feb 20 2022
a(n) = 10*A309761(n). - Chai Wah Wu, Jun 16 2025

A343447 Smallest m such that alternating integer 101...101 = A094028(m) is a multiple of A045572(n), (i.e., integers coprime with 10).

Original entry on oeis.org

0, 2, 2, 8, 10, 2, 7, 8, 2, 10, 26, 13, 14, 32, 2, 2, 4, 20, 22, 20, 23, 12, 8, 28, 29, 8, 32, 32, 34, 3, 32, 12, 80, 40, 41, 21, 2, 14, 47, 98, 1, 16, 52, 53, 2, 55, 8, 23, 120, 14, 20, 20, 64, 8, 3, 22, 68, 32, 20, 73, 74, 71, 38, 38, 32, 80, 82, 38, 8, 42
Offset: 1

Views

Author

Bernard Schott, Apr 15 2021

Keywords

Comments

Every number coprime with 10 has a smallest multiple that is repunit (A099679).
Every positive number has a smallest multiple consisting of a succession of 1's followed by a succession of 0's (A052983).
Every number coprime with 10 has a smallest multiple that is alternating of the form 1010...0101 (this sequence).

Examples

			A045572(3) = 7, the smallest alternating multiple of 7 in A094028 is A094028(2) = 10101 because 1443*7 = 10101, as 1 and 101 are not divisible by 7, so a(3) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = (5*n + (Mod[3*n + 2, 4] - 4))/2, m = 0}, While[! Divisible[1 + 100*(100^m - 1)/99, k], m++]; m]; Array[a, 100] (* Amiram Eldar, Apr 15 2021 *)
  • PARI
    a045572(n)=10*(n>>2)+[-1,1,3,7][n%4+1] \\ after Charles R Greathouse IV in A045572
    a094028(n) = 1+100*(100^n-1)/99
    a(n) = for(m=0, oo, if(a094028(m)%a045572(n)==0, return(m))) \\ Felix Fröhlich, Apr 15 2021

Extensions

More terms from Felix Fröhlich, Apr 15 2021
Showing 1-5 of 5 results.