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.

User: Alex Ratushnyak

Alex Ratushnyak's wiki page.

Alex Ratushnyak has authored 778 sequences. Here are the ten most recent ones:

A366202 Numbers x such that (x^2 AND x) is not a square, where AND is the bitwise logical-and operation.

Original entry on oeis.org

21, 23, 25, 39, 42, 43, 45, 47, 49, 51, 55, 58, 73, 75, 78, 79, 83, 85, 86, 87, 91, 93, 95, 97, 99, 101, 103, 106, 107, 109, 110, 111, 113, 115, 117, 122, 140, 141, 142, 143, 149, 150, 151, 153, 154, 155, 158, 159, 162, 163, 166, 167, 169, 170, 171, 172, 175
Offset: 1

Author

Alex Ratushnyak, Oct 04 2023

Keywords

Comments

Numbers x such that A213541(x) is not in A000290.

Crossrefs

Programs

  • Mathematica
    Select[Range[200],!IntegerQ[Sqrt[BitAnd[#^2,#]]]&] (* Harvey P. Dale, Nov 17 2024 *)

A366201 Number x such that triangular(x) AND x^2 = 0, where AND is the bitwise logical-and operation.

Original entry on oeis.org

0, 2, 3, 4, 8, 12, 16, 18, 24, 32, 34, 46, 48, 52, 64, 66, 68, 94, 96, 128, 130, 132, 144, 188, 192, 208, 256, 258, 260, 264, 288, 384, 415, 416, 512, 514, 516, 520, 544, 551, 576, 736, 768, 816, 831, 832, 1024, 1026, 1028, 1032, 1040, 1042, 1088, 1090, 1152, 1163
Offset: 1

Author

Alex Ratushnyak, Oct 04 2023

Keywords

Comments

Numbers x such that A000217(x) AND A000290(x) = 0.

Crossrefs

Cf. A000217, A000290, A004198 (AND).
Cf. A224694.

A356873 a(n) is the smallest number k such that 2^k+1 has at least n distinct prime factors.

Original entry on oeis.org

0, 5, 14, 18, 30, 42, 78, 78, 78, 90, 150, 150, 210, 210, 234, 234, 270, 390, 390, 390, 390, 450, 510, 630, 630, 630, 810, 810, 810, 966, 966, 1170, 1170, 1170, 1170, 1170, 1170, 1170
Offset: 1

Author

Alex Ratushnyak, Sep 02 2022

Keywords

Comments

From Jon E. Schoenfield, Sep 04 2022: (Start)
a(39) <= a(40) <= a(41) <= 1530.
a(42) <= a(43) <= a(44) <= 1890.
a(45) <= a(46) <= 2070.
a(47) <= a(48) <= ... <= a(54) = 2730. (End)

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k=0}, While[ Length@ FactorInteger[2^k + 1] < n, k++]; k]; Array[a, 12] (* Giovanni Resta, Oct 13 2022 *)
  • PARI
    a(n) = my(k=1); while (omega(2^k+1) < n, k++); k; \\ Michel Marcus, Sep 05 2022
  • Python
    from sympy import factorint, isprime
    from itertools import count, islice
    def f(n): return 1 if isprime(n) else len(factorint(n))
    def agen():
        n = 1
        for k in count(0):
            v = f(2**k+1)
            while v >= n: yield k; n += 1
    print(list(islice(agen(), 10))) # Michael S. Branicky, Sep 02 2022
    

Extensions

a(11)-a(38) from Michael S. Branicky, Sep 02 2022 using A071852

A356872 a(n) = k is the smallest number such that 3*k+1 contains n distinct prime factors.

Original entry on oeis.org

1, 3, 23, 303, 4363, 56723, 1077743, 33410043, 718854803, 22284498903, 824526459423, 35454637755203, 1588862487308763, 68321086954276823, 4167586304210886223, 213640038906023626563, 13032042373267441220363, 873146839008918561764343, 63739719247651055008797063
Offset: 1

Author

Alex Ratushnyak, Sep 02 2022

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorint, isprime
    from itertools import count, islice
    def f(n): return 1 if isprime(n) else len(factorint(n))
    def agen():
        n = 1
        for k in count(0):
            v = f(3*k+1)
            while v >= n: yield k; n += 1
    print(list(islice(agen(), 7))) # Michael S. Branicky, Sep 02 2022

Formula

From Michael S. Branicky, Sep 02 2022: (Start)
a(n) >= ceiling((A002110(n)-1)/3).
a(n) <= (c*A002110(n+1)/3-1)/3 for n > 1, and c = 1 or 2 chosen so the expression is an integer, with equality holding for c = 1 for n = 2, 3, 6, 7, ... . (End)

Extensions

a(8) from Michael S. Branicky, Sep 02 2022
a(9)-a(19) from Jon E. Schoenfield, Sep 02 2022

A356868 a(n) = n^2 * prime(n).

Original entry on oeis.org

2, 12, 45, 112, 275, 468, 833, 1216, 1863, 2900, 3751, 5328, 6929, 8428, 10575, 13568, 17051, 19764, 24187, 28400, 32193, 38236, 43907, 51264, 60625, 68276, 75087, 83888, 91669, 101700, 122047, 134144, 149193, 160684, 182525, 195696, 214933, 235372, 254007, 276800, 300899
Offset: 1

Author

Alex Ratushnyak, Sep 01 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n^2 * Prime[n]; Array[a, 40] (* Amiram Eldar, Sep 02 2022 *)
  • Python
    from sympy import prime
    def a(n): return n**2 * prime(n)
    print([a(n) for n in range(1, 41)]) # Michael S. Branicky, Sep 01 2022

A351599 a(n) is the smallest integer m > 0 such that m*n is a digitally balanced number (A031443).

Original entry on oeis.org

2, 1, 3, 3, 2, 2, 5, 7, 1, 1, 4, 1, 4, 3, 9, 15, 9, 10, 2, 9, 2, 2, 8, 9, 2, 2, 5, 2, 8, 5, 17, 31, 5, 5, 1, 5, 1, 1, 4, 6, 1, 1, 4, 1, 3, 4, 3, 5, 1, 1, 3, 1, 4, 4, 3, 1, 4, 4, 3, 3, 13, 9, 33, 63, 3, 3, 3, 3, 10, 3, 2, 3, 11, 9, 2, 3, 2, 2, 8, 3, 10, 9, 2
Offset: 1

Author

Alex Ratushnyak, May 02 2022

Keywords

Crossrefs

Programs

  • Mathematica
    balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; a[n_] := Module[{k = 1}, While[!balQ[k*n], k++]; k]; Array[a, 100] (* Amiram Eldar, May 02 2022 *)
  • PARI
    is(n) = hammingweight(n)==hammingweight(bitneg(n, #binary(n))); \\ A031443
    a(n) = my(m=1); while (!is(m*n), m++); m; \\ Michel Marcus, May 02 2022

Formula

a(n) = A143146(n) / n. - Rémy Sigrist, Jul 11 2022

A351598 Digitally balanced numbers b (A031443) such that b^b is also digitally balanced.

Original entry on oeis.org

49, 8677, 53543, 141169, 202055, 755917
Offset: 1

Author

Alex Ratushnyak, May 02 2022

Keywords

Crossrefs

Programs

  • Mathematica
    balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ @ (m = Length @ d) && Count[d, 1] == m/2]; Select[Range[10000], balQ[#] && balQ[#^#] &] (* Amiram Eldar, May 03 2022 *)
  • Python
    from itertools import count, islice
    def isdb(n): b = bin(n)[2:]; return b.count("0") == b.count("1")
    def agen(): yield from (b for b in count(1) if isdb(b) and isdb(b**b))
    print(list(islice(agen(), 2))) # Michael S. Branicky, Jun 12 2022

Extensions

a(4)-a(6) from Amiram Eldar, May 03 2022

A353140 Digitally balanced numbers (A031443) whose squares and cubes are also digitally balanced.

Original entry on oeis.org

3274, 13453, 13492, 13706, 14726, 15113, 15498, 15528, 52049, 52251, 52330, 52673, 52778, 53478, 53684, 53775, 53972, 54295, 54411, 54598, 54601, 55057, 55449, 55462, 55505, 55512, 55689, 56333, 58066, 58260, 58446, 58453, 58470, 58918, 59266, 59722, 59786
Offset: 1

Author

Alex Ratushnyak, Apr 26 2022

Keywords

Comments

Numbers x such that x, x^2 and x^3 are terms of A031443, that is, have the same number of 0's as 1's in their binary representations.

Crossrefs

Programs

  • Mathematica
    balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ @ (m = Length @ d) && Count[d, 1] == m/2]; Select[Range[60000], balQ[#] && balQ[#^2] && balQ[#^3] &] (* Amiram Eldar, Apr 26 2022 *)
  • Python
    from itertools import count, islice
    from sympy.utilities.iterables import multiset_permutations
    def isbalanced(n): b = bin(n)[2:]; return b.count("0") == b.count("1")
    def A031443gen(): yield from (int("1"+"".join(p), 2) for n in count(1) for p in multiset_permutations("0"*n+"1"*(n-1)))
    def agen():
        for k in A031443gen():
            if isbalanced(k**2) and isbalanced(k**3):
                yield k
    print(list(islice(agen(), 40))) # Michael S. Branicky, Apr 26 2022

A353139 Digitally balanced numbers (A031443) whose squares are also digitally balanced.

Original entry on oeis.org

212, 781, 794, 806, 817, 838, 841, 844, 865, 2962, 3101, 3130, 3171, 3178, 3185, 3213, 3219, 3226, 3269, 3274, 3335, 3353, 3354, 3356, 3370, 3378, 3490, 3496, 3521, 3528, 3595, 3597, 3606, 3610, 3626, 3651, 3672, 3718, 3777, 11797, 11798, 11850, 11938, 12049
Offset: 1

Author

Alex Ratushnyak, Apr 26 2022

Keywords

Comments

Numbers x such that both x and x^2 are terms of A031443, that is, have the same number of 0's as 1's in their binary representations.

Crossrefs

Programs

  • Mathematica
    balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ @ (m = Length @ d) && Count[d, 1] == m/2]; Select[Range[12000], balQ[#] && balQ[#^2] &] (* Amiram Eldar, Apr 26 2022 *)
  • Python
    from itertools import count, islice
    from sympy.utilities.iterables import multiset_permutations
    def isbalanced(n): b = bin(n)[2:]; return b.count("0") == b.count("1")
    def A031443gen(): yield from (int("1"+"".join(p), 2) for n in count(1) for p in multiset_permutations("0"*n+"1"*(n-1)))
    def agen():
        for k in A031443gen():
            if isbalanced(k**2):
                yield k
    print(list(islice(agen(), 40))) # Michael S. Branicky, Apr 26 2022

A351744 Increment all even digits of n.

Original entry on oeis.org

1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 71, 71, 73, 73, 75, 75, 77, 77
Offset: 0

Author

Alex Ratushnyak, Feb 17 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Array[FromDigits@ Map[If[EvenQ[#], # + 1, #] &, IntegerDigits[#]] &, 78, 0] (* Michael De Vlieger, Feb 17 2022 *)
  • PARI
    a(n) = if (n, fromdigits(apply(x->if(!(x%2),x+1,x), digits(n))), 1); \\ Michel Marcus, Feb 18 2022
  • Python
    for n in range(1000):
      s = str(n)
      res = ''
      for d in s:
        if (int(d) & 1)==0:  d = str(int(d)+1)
        res += d
      print(int(res), end=',')
    
  • Python
    def A351744(n): return int(str(n).translate({48:49,50:51,52:53,54:55,56:57})) # Chai Wah Wu, Apr 07 2022