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 11 results. Next

A331464 Numbers k such that k and k + 1 are both binary Smith numbers (A278909).

Original entry on oeis.org

1369, 1370, 1390, 1630, 1929, 2525, 2526, 2930, 3013, 3309, 3501, 3502, 3686, 3805, 3953, 3954, 4043, 4726, 4854, 5620, 5621, 5917, 6068, 6682, 6774, 6838, 7025, 7089, 7115, 7671, 7738, 7786, 8075, 9654, 9915, 10366, 10982, 11166, 11227, 11506, 11673, 11740, 11763
Offset: 1

Views

Author

Amiram Eldar, Jan 17 2020

Keywords

Examples

			1369 is in the sequence since both 1369 and 1369 + 1 = 1370 are binary Smith numbers.
		

Crossrefs

Programs

  • Mathematica
    binWt[n_] := Total @ IntegerDigits[n, 2]; binSmithQ[n_] := CompositeQ[n] && Plus @@ (Last@# * binWt[ First@# ] & /@ FactorInteger[n]) == binWt[n]; seq = {}; isSmith1 = binSmithQ[1]; Do[isSmith2 = binSmithQ[n]; If[isSmith1 && isSmith2, AppendTo[seq, n-1]]; isSmith1 = isSmith2, {n, 2, 12000}]; seq

A280972 Numbers that appear in both A278909 and A280967 but not in A280971.

Original entry on oeis.org

765, 1275, 1467, 1503, 1515, 1695, 2910, 2975, 3066, 3423, 4335, 4539, 4605, 4862, 4923, 4947, 4975, 5110, 5295, 5335, 5375, 5559, 5787, 5790, 5835, 5885, 6069, 6123, 6495, 6735, 6783, 7035, 7134, 9195, 9567, 9583, 9645, 9819, 9915, 10087, 10155, 10218, 10234, 10491, 10686, 10959, 10983, 11211
Offset: 1

Views

Author

Ely Golden, Jan 11 2017

Keywords

Comments

Binary equivalent of the sequence representing Numbers that appear in both A176670 and A020342 but not A280928 (currently no members are known).

Examples

			765 = A278909(41) = A280967(32) but is not present in A280971.
		

Crossrefs

A331465 a(n) begins the first run of exactly n consecutive binary Smith numbers (A278909).

Original entry on oeis.org

15, 1390, 1369, 11763, 47802, 1529690, 4628217, 1544053, 804607562, 4747704789
Offset: 1

Views

Author

Amiram Eldar, Jan 17 2020

Keywords

Comments

a(11) > 5*10^10.

Examples

			a(2) = 1390 since 1390 and 1391 are binary Smith numbers.
a(3) = 1369 since 1369, 1370, and 1371 are binary Smith numbers.
		

Crossrefs

Programs

  • Mathematica
    binWt[n_] := Total@IntegerDigits[n, 2]; binSmithQ[n_] := CompositeQ[n] && Plus @@ (Last@# * binWt[ First@# ] & /@ FactorInteger[n]) == binWt[n]; n = 1; count = 0; max = 6; seq = Table[0, {max}]; While[count < max, n1 = n; If[binSmithQ[n], While[binSmithQ[++n1]]; d = n1 - n; If[d <= max && seq[[d]] == 0, count++; seq[[d]] = n]]; n = n1 + 1]; seq

A337295 Reversible binary Smith numbers: binary Smith numbers (A278909) whose binary reversal (A030101) is also a binary Smith number.

Original entry on oeis.org

15, 51, 85, 159, 190, 249, 303, 471, 489, 639, 679, 763, 765, 771, 799, 843, 893, 917, 951, 995, 1010, 1017, 1023, 1167, 1203, 1285, 1467, 1501, 1615, 1630, 1641, 1707, 1742, 1773, 1788, 1929, 1939, 1970, 2015, 2167, 2319, 2367, 2493, 2787, 2931, 2975, 3033, 3055
Offset: 1

Views

Author

Amiram Eldar, Aug 21 2020

Keywords

Examples

			159 is a binary Smith number: 159 = 3 * 53 is in binary representation 10011111 = 11 * 110101, and (1 + 0 + 0 + 1 + 1 + 1 + 1 + 1) = (1 + 1) + (1 + 1 + 0 + 1 + 0 + 1) = 6. The binary reversal of 159 = 10011111_2 is 249 = 11111001_2 which is also a binary Smith number: 249 = 3 * 83 is in binary representation 11111001 = 11 * 1010011, and (1 + 1 + 1 + 1 + 1 + 0 + 0 + 1) = (1 + 1) + (1 + 0 + 1 + 0 + 0 + 1 + 1) = 6. Therefore, 159 is a term.
		

Crossrefs

The binary version of A104171.
Subsequence of A278909.
A334530 is a subsequence.
Cf. A030101.

Programs

  • Mathematica
    binSmithQ[n_] := CompositeQ[n] && Plus @@ (Last @#* DigitCount[First@#, 2, 1] & /@ FactorInteger[n]) == DigitCount[n, 2, 1]; rev[n_] := FromDigits[Reverse @ IntegerDigits[n, 2], 2]; Select[Range[3000], binSmithQ[#] && binSmithQ[rev[#]] &]

A278981 a(n) is the first composite number having the same base-n digits as its prime factors (with multiplicity), excluding zero digits (or 0 if no such composite number exists).

Original entry on oeis.org

15, 399, 85, 318, 57, 906, 85, 1670, 1111, 18193, 185, 7205205, 4119, 63791, 4369, 1548502, 489, 258099, 451, 408166, 13315, 1012985, 679, 25841526, 26533, 2884373, 985, 49101338, 1057, 5362755, 1285, 2447558, 179503, 3091422, 1387, 5830693854, 82311, 149338, 2005
Offset: 2

Views

Author

Ely Golden, Dec 02 2016

Keywords

Comments

For an alternate program that only checks a single base at a time, use the code from "#the actual function (alternate)" instead of "#the actual function".
The computation of a(n) is exceedingly inefficient, requiring the checking of all natural values less than a(n). A more efficient way to compute a(n) is very desirable. - Ely Golden, Dec 25 2016
There is a lower bound on a(n), if not 0, of n^2 + n + 1. As well, a(n) must have 3 or more nonzero digits in base n (if n is odd, this lower bound is n^3 + n^2 + n + 1, and a(n) must have 4 or more nonzero digits in base n). This does not significantly improve the computation of a(n), however. - Ely Golden, Dec 30 2016
The pattern in the magnitude of a(n) is unclear. For some values of n, a(n) is much larger than for other values. For example, a(65) is 2460678262, whereas a(64) is only 4369 and a(66) is 4577. It seems as though even values of n typically have smaller values of a(n). - Ely Golden, Dec 30 2016
It is known that a(n) > 0 for any nonzero member of this sequence, as well as any n >= 2 of the form A280270(m), A070689(m), A279480(m), 2*A089001(m), 2*A115104(m), and 2*A280273(m)-1. It is likely, but not known, that a(n) > 0 for all n >= 2. - Ely Golden, Dec 30 2016

Examples

			a(2) = 15, as 15 is the first composite number whose base-2 nonzero digits (1111) are the same as the base-2 nonzero digits of its prime factors (11_2 and 101_2).
		

Crossrefs

a(10) = A176670(1); a(2) = A278909(1).

Programs

  • Mathematica
    g[n_] := g[n] = Flatten[ Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]];
    f[b_] := Block[{c = b^2}, While[ PrimeQ@ c || DeleteCases[ Sort[ IntegerDigits[c, b]], 0] != DeleteCases[ Sort[ Flatten[ IntegerDigits[g[c], b]]], 0], c++]; c]; Array[f, 39, 2] (* Robert G. Wilson v, Dec 30 2016 *)
  • SageMath
    def nonZeroDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        while(x>0):
            d=divmod(x,n)
            if(d[1]!=0):
                li.append(d[1])
            x=d[0]
        li.sort()
        return li;
    def nonZeroFactorDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        f=list(factor(x))
        #ensures inequality of nonZeroFactorDigits(x,n) and nonZeroDigits(x,n) if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return [];
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=nonZeroDigits(f[c][0],n)
                li+=ld
        li.sort()
        return li;
    #the actual function
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
        return c;
    index=2
    while(index<=100):
        print(str(index)+" "+str(a(index)))
        index+=1
    print("complete")
    #the actual function (alternate)
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
            if(c%1000000==1):
                print("checked up to "+str(c-1))
        return c;
    x=3 # 
    print(str(x)+" "+str(a(x)))
    print("complete")

A329936 Binary hoax numbers: composite numbers k such that sum of bits of k equals the sum of bits of the distinct prime divisors of k.

Original entry on oeis.org

4, 8, 9, 15, 16, 32, 45, 49, 50, 51, 55, 64, 75, 85, 100, 117, 126, 128, 135, 153, 159, 162, 171, 185, 190, 200, 205, 207, 215, 222, 225, 238, 246, 249, 252, 253, 256, 287, 303, 319, 324, 333, 338, 350, 369, 374, 378, 380, 400, 407, 438, 442, 444, 469, 471
Offset: 1

Views

Author

Amiram Eldar, Nov 24 2019

Keywords

Comments

Analogous to A278909 (binary Smith numbers) as A019506 (hoax numbers) is analogous to A006753 (Smith numbers).
Includes all the powers of 2 except for 1 and 2.

Examples

			4 = 2^2 is in the sequence since the binary representation of 4 is 100 and 1 + 0 + 0 = 1, and the binary representation of 2 is 10 and 1 + 0 = 1.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n)
    if isprime(n) then return false fi;
    convert(convert(n,base,2),`+`) = add(convert(convert(t,base,2),`+`),t=numtheory:-factorset(n))
    end proc:
    select(filter, [$2..1000]); # Robert Israel, Nov 28 2019
  • Mathematica
    binWt[n_] := Total @ IntegerDigits[n, 2]; binHoaxQ[n_] := CompositeQ[n] && Total[binWt /@ FactorInteger[n][[;; , 1]]] == binWt[n]; Select[Range[500], binHoaxQ]
  • PARI
    is(n)= my(f=factor(n)[,1]); sum(i=1,#f, hammingweight(f[i]))==hammingweight(n) && !isprime(n) \\ Charles R Greathouse IV, Nov 28 2019

A334530 Numbers that are both binary palindromes and binary Smith numbers.

Original entry on oeis.org

15, 51, 85, 471, 765, 771, 843, 951, 1023, 1285, 1501, 1707, 2015, 3687, 3831, 4095, 4369, 4777, 5621, 5917, 6077, 6483, 6643, 6891, 6939, 7003, 7099, 7447, 7671, 10041, 11565, 12093, 13011, 14631, 15063, 15855, 20345, 20473, 22517, 23213, 26067, 26483, 26611
Offset: 1

Views

Author

Amiram Eldar, May 05 2020

Keywords

Examples

			15 is a term since its binary representation, 1111, is palindromic, and its prime factorization, 3 * 5, is 11 * 101 in binary representation, and 1 + 1 + 1 + 1 = (1 + 1) + (1 + 0 + 1).
		

Crossrefs

Intersection of A006995 and A278909.
Cf. A098834.

Programs

  • Mathematica
    binPalSmithQ[n_] := PalindromeQ[(d = IntegerDigits[n, 2])] && CompositeQ[n] && Plus @@ (Last@# * DigitCount[First@#, 2, 1] & /@ FactorInteger[n]) == Plus @@ d; Select[Range[10^5], binPalSmithQ]

A280971 Composite numbers having the same bits as their prime factors (with multiplicity), including zero bits.

Original entry on oeis.org

159, 287, 303, 319, 591, 623, 679, 687, 699, 763, 1135, 1167, 1203, 1243, 1247, 1271, 1351, 1371, 1391, 1631, 2167, 2173, 2231, 2285, 2319, 2359, 2463, 2471, 2495, 2519, 2743, 2779, 2787, 2809, 2863, 2931, 2933, 2991, 3029, 3039, 3503, 4223, 4279, 4287, 4319, 4343, 4411, 4439, 4479, 4487
Offset: 1

Views

Author

Ely Golden, Jan 11 2017

Keywords

Comments

Binary equivalent of A280928.
Subsequence of A278909 as well as A280967. The terms in A278909 and A280967 but not this sequence are given by A280972.

Crossrefs

Programs

  • Python
    from sympy import factorint
    def ok(n):
        f = factorint(n)
        return sum(f.values()) > 1 and sorted(bin(n)[2:]) == sorted("".join(bin(p)[2:]*f[p] for p in f))
    print([k for k in range(5000) if ok(k)]) # Michael S. Branicky, Apr 20 2025
  • SageMath
    def factorbits(x):
        if(x<2):
            return (0,0);
        s=0;t=0
        f=list(factor(x));
        #ensures inequality of numfactorbits(x) and bin(x).count("1") if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return (0,0);
        for c in range(len(f)):
            s+=bin(f[c][0]).count("1")*f[c][1]
            t+=(bin(f[c][0]).count("0")-1)*f[c][1]
        return (s,t);
    counter=2
    index=1
    while(index<=10000):
        if(factorbits(counter)==(bin(counter).count("1"),bin(counter).count("0")-1)):
            print(str(index)+" "+str(counter))
            index+=1;
        counter+=1;
    

A334531 Numbers that are both binary Niven numbers and binary Smith numbers.

Original entry on oeis.org

55, 185, 205, 222, 246, 438, 623, 822, 973, 1503, 1939, 2359, 2471, 3126, 3205, 3462, 3573, 3661, 3771, 3846, 4711, 5877, 5949, 6093, 6198, 6655, 6918, 7083, 7550, 7931, 8151, 8170, 9567, 9863, 10265, 10683, 11241, 12280, 12318, 12486, 12678, 13695, 13790, 13820
Offset: 1

Views

Author

Amiram Eldar, May 05 2020

Keywords

Examples

			The binary representation of 55 is 110111. It is a binary Niven number since 1 + 1 + 0 + 1 + 1 + 1 = 5 is a divisor of 55. It is also a binary Smith number since its prime factorization, 5 * 11, is 101 * 1011 in binary representation, and 1 + 1 + 0 + 1 + 1 + 1 = (1 + 0 + 1) + (1 + 0 + 1 + 1). Thus 55 is a term.
		

Crossrefs

Intersection of A049445 and A278909.
Cf. A334527.

Programs

  • Mathematica
    binWt[n_] := DigitCount[n, 2, 1]; binNivenSmithQ[n_] := Divisible[n, (bw = binWt[n])] && CompositeQ[n] && Plus @@ (Last@# * binWt[First@#] & /@ FactorInteger[n]) == bw; Select[Range[10^4], binNivenSmithQ]

A334532 Binary palindromic numbers that are also binary Niven and binary Smith numbers.

Original entry on oeis.org

22517, 317273, 5876429, 7129499, 18659953, 20053785, 24328605, 28676955, 31134135, 88700053, 92254197, 95682157, 96316909, 97462173, 117812487, 120026919, 120303271, 120323751, 128167471, 133396095, 133984767, 292610513, 309416393, 314572713, 348580965, 351400421
Offset: 1

Views

Author

Amiram Eldar, May 05 2020

Keywords

Examples

			The binary representation of 22517 is 101011111110101 which is palindromic. The number of 1's in its binary representation is 11 which is a divisor of 22517, hence 22517 is a binary Niven. It is also a binary Smith number since its prime factorization, 11 * 23 * 89, is 1011 * 10111 * 1011001 in binary representation, and (1 + 0 + 1 + 1) + (1 + 0 + 1 + 1 + 1) + (1 + 0 + 1 + 1 + 0 + 0 + 1) = 3 + 4 + 4 = 11 is equal to the number of 1's in its binary representation.
		

Crossrefs

Intersection of A006995, A049445 and A278909.
Intersection of any two of the sequences A334529, A334530 and A334531.
Cf. A334528.

Programs

  • Mathematica
    binWt[n_] := DigitCount[n, 2, 1]; binPalNivenSmithQ[n_] := Divisible[n, (bw = Plus @@ (d = IntegerDigits[n, 2]))] && PalindromeQ[d] && CompositeQ[n] && Plus @@ (Last@# * binWt[First@#] & /@ FactorInteger[n]) == bw; Select[Range[2*10^6], binPalNivenSmithQ]
Showing 1-10 of 11 results. Next