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

A272919 Numbers of the form 2^(n-1)*(2^(n*m)-1)/(2^n-1), n >= 1, m >= 1.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 15, 16, 31, 32, 36, 42, 63, 64, 127, 128, 136, 170, 255, 256, 292, 511, 512, 528, 682, 1023, 1024, 2047, 2048, 2080, 2184, 2340, 2730, 4095, 4096, 8191, 8192, 8256, 10922, 16383, 16384, 16912, 18724, 32767, 32768, 32896, 34952, 43690, 65535, 65536, 131071
Offset: 1

Views

Author

Ivan Neretin, May 10 2016

Keywords

Comments

In other words, numbers whose binary representation consists of one or more repeating blocks with only one 1 in each block.
Also, fixed points of the permutations A139706 and A139708.
Each a(n) is a term of A064896 multiplied by some power of 2. As such, this sequence must also be a subsequence of A125121.
Also the numbers that uniquely index a Haar graph (i.e., 5 and 6 are not in the sequence since H(5) is isomorphic to H(6)). - Eric W. Weisstein, Aug 19 2017
From Gus Wiseman, Apr 04 2020: (Start)
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions. This sequence lists all positive integers k such that the k-th composition in standard order is constant. For example, the sequence together with the corresponding constant compositions begins:
0: () 136: (4,4)
1: (1) 170: (2,2,2,2)
2: (2) 255: (1,1,1,1,1,1,1,1)
3: (1,1) 256: (9)
4: (3) 292: (3,3,3)
7: (1,1,1) 511: (1,1,1,1,1,1,1,1,1)
8: (4) 512: (10)
10: (2,2) 528: (5,5)
15: (1,1,1,1) 682: (2,2,2,2,2)
16: (5) 1023: (1,1,1,1,1,1,1,1,1,1)
31: (1,1,1,1,1) 1024: (11)
32: (6) 2047: (1,1,1,1,1,1,1,1,1,1,1)
36: (3,3) 2048: (12)
42: (2,2,2) 2080: (6,6)
63: (1,1,1,1,1,1) 2184: (4,4,4)
64: (7) 2340: (3,3,3,3)
127: (1,1,1,1,1,1,1) 2730: (2,2,2,2,2,2)
128: (8) 4095: (1,1,1,1,1,1,1,1,1,1,1,1)
(End)

Crossrefs

Cf. A137706 (smallest number indexing a new Haar graph).
Compositions in standard order are A066099.
Strict compositions are ranked by A233564.

Programs

  • Maple
    N:= 10^6: # to get all terms <= N
    R:= select(`<=`,{seq(seq(2^(n-1)*(2^(n*m)-1)/(2^n-1), m = 1 .. ilog2(2*N)/n), n = 1..ilog2(2*N))},N):
    sort(convert(R,list)); # Robert Israel, May 10 2016
  • Mathematica
    Flatten@Table[d = Reverse@Divisors[n]; 2^(d - 1)*(2^n - 1)/(2^d - 1), {n, 17}]

Formula

From Gus Wiseman, Apr 04 2020: (Start)
A333381(a(n)) = A027750(n).
For n > 0, A124767(a(n)) = 1.
If n is a power of two, A333628(a(n)) = 0, otherwise = 1.
A333627(a(n)) is a power of 2.
(End)

A064896 Numbers of the form (2^(m*r)-1)/(2^r-1) for positive integers m, r.

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 17, 21, 31, 33, 63, 65, 73, 85, 127, 129, 255, 257, 273, 341, 511, 513, 585, 1023, 1025, 1057, 1365, 2047, 2049, 4095, 4097, 4161, 4369, 4681, 5461, 8191, 8193, 16383, 16385, 16513, 21845, 32767, 32769, 33825, 37449, 65535, 65537
Offset: 1

Views

Author

Marc LeBrun, Oct 11 2001

Keywords

Comments

Binary expansion of n consists of single 1's diluted by (possibly empty) equal-sized blocks of 0's.
According to Stolarsky's Theorem 2.1, all numbers in this sequence are sturdy numbers; this sequence is a subsequence of A125121. - T. D. Noe, Jul 21 2008
These are the numbers k > 0 for which k + 2^m = k*2^n + 1 has a solution m,n > 0. For k > 1, these are numbers k such that (k - 2^x)*2^y + 1 = k has a solution in positive integers x,y. In other words, (k - 1)/(k - 2^x) = 2^y for some x,y > 0. If t = (2^m - 1)/(2^n - 1) is a term of this sequence (i.e. if and only if n|m), then t' = t + 2^m = t*2^n + 1 is also a term. Primes in this sequence (A245730) include: all Mersenne primes (A000668), all Fermat primes (A019434), and other primes (73, 262657, 4432676798593, ...). - Thomas Ordowski, Feb 14 2024

Examples

			73 is included because it is 1001001 in binary, whose 1's are diluted by blocks of two 0's.
		

Crossrefs

Cf. A076270 (k=3), A076275 (k=4), A076284 (k=5), A076285 (k=6), A076286 (k=7), A076287 (k=8), A076288 (k=9), A076289 (k=10).
Primes in this sequence: A245730.

Programs

  • Maple
    f := proc(p) local m,r,t1; t1 := {}; for m from 1 to 10 do for r from 1 to 10 do t1 := {op(t1), (p^(m*r)-1)/(p^r-1)}; od: od: sort(convert(t1,list)); end; f(2); # very crude!
    # Alternative:
    N:= 10^6: # to get all terms <= N
    A:= sort(convert({1,seq(seq((2^(m*r)-1)/(2^r-1),m=2..1/r*ilog2(N*(2^r-1)+1)),r=1..ilog2(N-1))},list)); # Robert Israel, Jun 12 2015
  • PARI
    lista(nn) = {v = [1]; x = (2^nn-1); for (m=2, nn, r = 1; while ((y = (2^(m*r)-1)/(2^r-1)) <=x, v = Set(concat(v, y)); r++);); v;} \\ Michel Marcus, Jun 12 2015

Formula

A064894(a(n)) = A056538(n).

A143027 Sturdy prime numbers: p such that in binary notation k*p has at least as many 1-bits as p for all k > 0.

Original entry on oeis.org

2, 3, 5, 7, 17, 31, 73, 89, 127, 257, 1801, 2089, 8191, 65537, 131071, 178481, 262657, 524287, 2099863, 616318177, 2147483647, 4432676798593
Offset: 1

Views

Author

T. D. Noe, Jul 17 2008, Jul 21 2008

Keywords

Comments

The primes in A125121. This sequence includes the Fermat primes (A019434), Mersenne primes (A000668) and the three known primes in A051154. It appears that almost all primes are flimsy numbers, A005360.
Odd sturdy primes appear to be the largest primitive prime factor of 2^q-1 for q a prime or prime power. The values of q for the current terms: 2, 4, 3, 8, 5, 9, 11, 16, 25, 29, 13, 32, 17, 23, 27 and 19. The sequence probably continues with 2099863, 6700417, 13264529, 20394401, 97685839.
From T. D. Noe, Mar 01 2010: (Start)
Max Alekseyev reports that 6700417, 13264529, 20394401, and 97685839 are not sturdy because each number divides a number having fewer 1-bits: 6700417 divides 2^32 + 1, 13264529 divides 331613225, 20394401 divides 1611157679, and 97685839 divides 18014398643699713. He conjectures that 616318177 is the next term.
If q is a prime power, q = r^s, then the primitive part of 2^q-1 is (2^r^s-1)/(2^r^(s-1)-1). According to Stolarsky's Theorem 2.1, this primitive part is sturdy. If the primitive part is prime, then it is in this sequence. Hence 7^2 produces the sturdy prime 4432676798593 and 59^2 produces a 1031-digit sturdy prime. (End)
Clokie et al. verify that the next two sturdy primes after 2099863 are 616318177 and 2147483647. These are all up to 2^32. Two additional sturdy primes are 57912614113275649087721 = (2^83 - 1)/167 and 10350794431055162386718619237468234569 = (2^131 - 1)/263, but probably there are some in between these and 2147483647. Jeffrey Shallit, Feb 10 2020
From Jason Yuen, Mar 30 2024: (Start)
For all x>log_2(p), 1+A000120(p-(2^x mod p)) >= A000120(p). This follows from the fact that 2^x+p-(2^x mod p) is a multiple of p.
a(23) > 5*10^12. See a143027_5e12.txt for more details. (End)

Crossrefs

Extensions

2089 and 8191 were found by Ray Chandler
2099863 added by T. D. Noe, Mar 01 2010
616318177, 2147483647 added by Jeffrey Shallit, Feb 10 2020
4432676798593 added by Jason Yuen, Mar 30 2024

A005360 Flimsy numbers.

Original entry on oeis.org

11, 13, 19, 22, 23, 25, 26, 27, 29, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 55, 57, 58, 59, 61, 67, 71, 74, 76, 77, 78, 79, 81, 82, 83, 86, 87, 88, 91, 92, 94, 95, 97, 99, 100, 101, 103, 104, 106, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117, 118, 119, 121
Offset: 1

Views

Author

Keywords

Comments

Definition: n is flimsy if and only if there exists a k such that A000120(k*n) < A000120(n). That is, some multiple of n has fewer ones in its binary expansion than does n. What are the associated k for each n? What is the smallest n for each k? Stolarsky says "at least half the primes are flimsy." - Jonathan Vos Post, Jul 07 2008
A143073(n) gives the least k for each n in this sequence. - T. D. Noe, Jul 22 2008
If k is in this sequence then so is 2*k. - David A. Corneth, Oct 01 2016

Examples

			11 is flimsy because A000120(3*11) = 2 < A000120(11) = 3.
107 is flimsy because A000120(3*107) = 3 < A000120(107) = 5.
The numbers 37*2^j are flimsy with k=7085. The numbers 67*2^j are flimsy with k = 128207979, 81*2^j are flimsy with k = 1657009, 83*2^j are flimsy with k = 395, 97*2^j with k = 172961, 101*2^j with k = 365, 113*2^j with k = 145, 137*2^j with k = 125400505, any j >= 0. - _R. J. Mathar_, Jul 14 2008
		

References

  • Bojan Basic, The existence of n-flimsy numbers in a given base, The Ramanujan Journal, March 7, 2016, pages 1-11. DOI 10.1007/s11139-015-9768-7.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000120, A125121 (complement).

Programs

  • Mathematica
    nmax = 121; kmax = 200; nn = {37, 67, 81, 83, 97, 101, 113}; flimsyQ[n_ /; MemberQ[nn, n] || MatchQ[FactorInteger[n], {{2, } , {Alternatives @@ nn, 1}}]] = True; flimsyQ[n] := For[k = 2, True, k++, Which[DigitCount[k * n, 2, 1] < DigitCount[n, 2, 1], Return[True], k > kmax, Return[False]]]; Reap[Do[If[flimsyQ[n], Sow[n]], {n, 2, nmax}]][[2, 1]] (* Jean-François Alcover, May 23 2012, after R. J. Mathar *)
    nmax = 200; Bits[n_Integer] := Count[IntegerDigits[n, 2], 1]; FlimsyQ[n_Integer] := FlimsyQ[n] = Module[{res, b = Bits[n], k}, If[b <= 2, False, If[EvenQ[n], FlimsyQ[n/2], res = Union[Mod[2^Range[n], n]]; If[Length[res] == n - 1, True, k = 2; While[k < b && ! MemberQ[Union[Mod[Plus @@@ Subsets[res, {k}], n]], 0], k++]; k < b]]]]; Select[Range[nmax], FlimsyQ] (* Jean-François Alcover, Feb 11 2016, this code is due to T. D. Noe *)

Extensions

More terms from R. J. Mathar, Jul 14 2008

A086342 Smallest number of 1's in binary expansion of any positive multiple of n.

Original entry on oeis.org

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

Views

Author

Sean A. Irvine, Sep 02 2003

Keywords

Comments

If n is a power of 2 then a(n)=1. All other positive n have a(n)>1. a(n)=2 precisely in cases where some multiple of n is a factor of 2^q+1 for some q.

Examples

			a(n)=2 for n=53, 59, 61, 67, 81, 97 and 101 because n divides 2^k+1 for k=26, 29, 30, 33, 27, 24 and 50, respectively. - _T. D. Noe_, Jul 22 2008
		

Crossrefs

Cf. A005360 (flimsy numbers), A125121 (sturdy numbers), A143069 (least multiple).

Programs

  • PARI
    a(n)=if(!n, return(0)); n>>=valuation(n,2); my(o=znorder(Mod(2, n)), v1=Set(powers(Mod(2, n), o)), v=v1, s=1); while(!setsearch(v, Mod(0, n)), v=setbinop((x, y)->x+y, v, v1); s++); s \\ Charles R Greathouse IV, Dec 07 2016

Formula

a(2^k-1) = k. - Thomas Dybdahl Ahle, May 01 2013

Extensions

More terms from Robert G. Wilson v, Feb 21 2005
Corrected by T. D. Noe, Jul 22 2008
An incorrect Mathematica program was deleted Aug 01 2008

A140797 Numbers of the form (2^p^N-1)/(2^p^(N-1)-1), where N>0, p is prime.

Original entry on oeis.org

3, 5, 7, 17, 31, 73, 127, 257, 2047, 8191, 65537, 131071, 262657, 524287, 1082401, 8388607, 536870911, 2147483647, 4294967297, 137438953471, 2199023255551, 4432676798593, 8796093022207, 140737488355327, 9007199254740991, 18014398643699713, 576460752303423487
Offset: 1

Views

Author

Vladimir Shevelev, Jul 15 2008

Keywords

Comments

Contains Fermat numbers A000215 (p=2) and Mersenne numbers A001348 (N=1). The terms of the sequence are either primes A000040 or overpseudoprimes A141232.
The values of A019320(n) for prime power n, sorted. This sequence is a subsequence of A064896, which means that all terms are sturdy numbers (A125121). It appears that the largest prime factor of each of these numbers is a sturdy prime (A143027). - T. D. Noe, Jul 21 2008

Crossrefs

Programs

  • Mathematica
    nmax[p_] := Which[p == 2, 6, p == 3, 4, True, 2];
    Reap[Do[If[IntegerQ[k = (2^p^n-1)/(2^p^(n-1)-1)] && k<10^18, Print[{p, n, k}]; Sow[k]], {p, Prime[Range[17]]}, {n, 1, nmax[p]}]][[2, 1]] // Union (* Jean-François Alcover, Dec 10 2018 *)

Extensions

Definition corrected by and more terms from T. D. Noe, Jul 21 2008

A143069 Least number k such that n*k has the fewest possible ones in its binary expansion.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, 1, 27, 1, 1, 3, 3, 1, 41, 5, 19, 1, 565, 1, 1, 1, 1, 1, 1, 1, 7085, 27, 7, 1, 25, 1, 3, 3, 1, 3, 11, 1, 1, 41, 1, 5, 1266205, 19, 7, 1, 9, 565, 9099507, 1, 17602325, 1, 1, 1, 1, 1, 128207979, 1, 1, 1, 119, 1, 1, 7085, 1, 27, 5, 7, 13
Offset: 1

Views

Author

T. D. Noe, Jul 22 2008

Keywords

Comments

a(n)=1 indicates that n is a sturdy number (A125121); that is, no multiple of n has fewer ones than the binary expansion of n. A086342(n) gives the least possible number of ones in the binary expansion of a multiple of n. Compare with A143073.

A143073 Least number k such that the binary expansion of n*k has fewer ones than n, or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 0, 27, 0, 0, 3, 3, 0, 41, 5, 3, 0, 5, 0, 0, 0, 0, 0, 0, 0, 7085, 27, 7, 0, 25, 0, 3, 3, 0, 3, 3, 0, 0, 41, 0, 5, 5, 3, 3, 0, 9, 5, 3, 0, 5, 0, 0, 0, 0, 0, 128207979, 0, 0, 0, 119, 0, 0, 7085, 0, 27, 5, 7, 7, 0, 1657009, 25, 395, 0, 0, 3, 3, 3, 0, 0
Offset: 1

Views

Author

T. D. Noe, Jul 22 2008

Keywords

Comments

a(n)=0 indicates that n is a sturdy number (A125121); that is, no multiple of n has fewer ones than the binary expansion of n. If a(n)>0, n is a flimsy number (A005360). Compare with A143069.

A181862 Decimal sturdy numbers: positive integers m such that sum of digits of k * m for any positive integer k is at least the sum of digits of m.

Original entry on oeis.org

1, 3, 9, 10, 11, 12, 18, 21, 27, 30, 33, 36, 41, 45, 54, 63, 72, 81, 90, 99, 100, 101, 102, 108, 110, 111, 117, 120, 123, 126, 132, 135, 144, 153, 162, 171, 180, 198, 201, 207, 210, 216, 225, 231, 234, 243, 252, 261, 270, 297, 300, 303, 306, 315, 324, 330, 333, 342, 351, 360, 396, 405, 410
Offset: 1

Views

Author

Max Alekseyev, Nov 14 2010

Keywords

Comments

Positive integers m such that A007953(m) = A077196(m).
All powers of 10 and many multiples of 3 are in this sequence, many prime numbers are not. Notable exceptions are the primes 11 and 41 that are in this sequence, and multiples of 3 like 6 and 15 that are not.
This suggests that a digit sum of 6 disqualifies a multiple of 3 from this sequence, not parity. A digit sum of 9, by contrast, ensures the number is in this sequence. - Alonso del Arte, Oct 02 2016

Examples

			11 has a digit sum of 2. If a multiple of 11 exists with a digit sum of 1, that would mean a power of 10 is also a multiple of 11, which is absurd. Therefore 11 is in the sequence.
12 = 2^2 * 3 has a digit sum of 3. In base 10, all multiples of 3 have a digital root of 3, 6 or 9, which means that a total digit sum of 1 or 2 is impossible for a multiple of 3. Therefore 12 is in the sequence.
13 has a digit sum of 4. However, note that 7 * 11 * 13 = 1001, which has a digit sum of 2. So 13 is not in the sequence.
		

Crossrefs

A235264 Tileable numbers: base-2 representation, considered as a fixed disconnected polyomino, tiles all places >= 0.

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 17, 21, 31, 33, 51, 63, 65, 73, 85, 127, 129, 195, 255, 257, 273, 341, 455, 511, 513, 585, 771, 819, 1023, 1025, 1057, 1285, 1365, 2047, 2049, 3075, 3591, 3855, 4095, 4097, 4161, 4369, 4681, 5461
Offset: 1

Views

Author

David W. Wilson, Jan 05 2014

Keywords

Examples

			n = 3855 has 2-adic representation .10100000101, and negative reciprocal repeating 2-adic m = .(1100110000000000)...  The 2-adic product n*m = -1 = .(1)... involves no carries, so n is tileable.
		

Crossrefs

Conjecturally, subset of A006995 (base-2 palindromes).

Formula

Numbers n such that 2-adic m = -1/n exists and 2-adic product m*n involves no carries.
Conjecturally, a(n) = (2^k-1)/m where k, m >= 1, and base-2 product m*a(n) involves no carries. Confirmed for a(n) <= 2^20.
Conjecturally, a(n) is of the form Product (2^(d_i*b_i)-1)/(2^b_i-1) where d_i >= 1, b_i >= 2, and d_i*b_i | d_(i+1). Confirmed for a(n) <= 2^20.
First conjecture is equivalent to the 2-adic definition. - Charlie Neder, Nov 04 2018
Second conjecture is true, see Neder link. - Charlie Neder, Dec 04 2018
Showing 1-10 of 10 results.