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

A278222 The least number with the same prime signature as A005940(n+1).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 4, 8, 2, 6, 6, 12, 4, 12, 8, 16, 2, 6, 6, 12, 6, 30, 12, 24, 4, 12, 12, 36, 8, 24, 16, 32, 2, 6, 6, 12, 6, 30, 12, 24, 6, 30, 30, 60, 12, 60, 24, 48, 4, 12, 12, 36, 12, 60, 36, 72, 8, 24, 24, 72, 16, 48, 32, 64, 2, 6, 6, 12, 6, 30, 12, 24, 6, 30, 30, 60, 12, 60, 24, 48, 6, 30, 30, 60, 30, 210, 60, 120, 12, 60, 60, 180, 24, 120, 48, 96, 4, 12, 12
Offset: 0

Views

Author

Antti Karttunen, Nov 15 2016

Keywords

Comments

This sequence can be used for filtering certain base-2 related sequences, because it matches only with any such sequence b that can be computed as b(n) = f(A005940(n+1)), where f(n) is any function that depends only on the prime signature of n (some of these are listed under the index entry for "sequences computed from exponents in ...").
Matching in this context means that the sequence a matches with the sequence b iff for all i, j: a(i) = a(j) => b(i) = b(j). In other words, iff the sequence b partitions the natural numbers to the same or coarser equivalence classes (as/than the sequence a) by the distinct values it obtains.
Because the Doudna map n -> A005940(1+n) is an isomorphism from "unary-binary encoding of factorization" (see A156552) to the ordinary representation of the prime factorization of n, it follows that the equivalence classes of this sequence match with any such sequence b, where b(n) is computed from the lengths of 1-runs in the binary representation of n and the order of those 1-runs does not matter. Particularly, this holds for any sequence that is obtained as a "Run Length Transform", i.e., where b(n) = Product S(i), for some function S, where i runs through the lengths of runs of 1's in the binary expansion of n. See for example A227349.
However, this sequence itself is not a run length transform of any sequence (which can be seen for example from the fact that A046523 is not multiplicative).
Furthermore, this matches not only with sequences involving products of S(i), but with any sequence obtained with any commutative function applied cumulatively, like e.g., A000120 (binary weight, obtained in this case as Sum identity(i)), and A069010 (number of runs of 1's in binary representation of n, obtained as Sum signum(i)).

Crossrefs

Similar sequences: A278217, A278219 (other base-2 related variants), A069877 (base-10 related), A278226 (primorial base), A278234-A278236 (factorial base), A278243 (Stern polynomials), A278233 (factorization in ring GF(2)[X]), A046523 (factorization in Z).
Cf. also A286622 (rgs-transform of this sequence) and A286162, A286252, A286163, A286240, A286242, A286379, A286464, A286374, A286375, A286376, A286243, A286553 (various other sequences involving this sequence).
Sequences that partition N into same or coarser equivalence classes: too many to list all here (over a hundred). At least every sequence listed under index-entry "Run Length Transforms" is included (e.g., A227349, A246660, A278159), and also sequences like A000120 and A069010, and their combinations like A136277.

Programs

  • Mathematica
    f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; Array[If[# == 1, 1, Times @@ MapIndexed[ Prime[First[#2]]^#1 &, Sort[FactorInteger[#][[All, -1]], Greater]]] &@ f[# - 1, 1, 1] &, 99] (* Michael De Vlieger, May 09 2017 *)
  • PARI
    A046523(n)=factorback(primes(#n=vecsort(factor(n)[, 2], , 4)), n)
    a(n)=my(p=2, t=1); for(i=0,exponent(n), if(bittest(n,i), t*=p, p=nextprime(p+1))); A046523(t) \\ Charles R Greathouse IV, Nov 11 2021
  • Python
    from sympy import prime, factorint
    import math
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return a046523(a005940(n + 1)) # Indranil Ghosh, May 05 2017
    
  • Scheme
    (define (A278222 n) (A046523 (A005940 (+ 1 n))))
    

Formula

a(n) = A046523(A005940(1+n)).
a(n) = A124859(A278159(n)).
a(n) = A278219(A006068(n)).

Extensions

Misleading part of the name removed by Antti Karttunen, Apr 07 2022

A286255 Compound filter: a(n) = P(A046523(n), A046523(1+n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

2, 5, 12, 14, 23, 27, 38, 63, 40, 27, 80, 90, 23, 61, 216, 152, 80, 90, 80, 148, 61, 27, 302, 375, 40, 84, 179, 90, 467, 495, 530, 698, 61, 61, 826, 702, 23, 61, 412, 324, 467, 495, 80, 265, 148, 27, 1178, 1323, 109, 148, 142, 90, 302, 430, 412, 430, 61, 27, 1832, 1890, 23, 142, 2787, 2410, 601, 495, 80, 148, 601, 495, 2630, 2700, 23, 142, 265, 148, 601, 495, 1178
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A005383 (after its initial term 3, gives the positions of 23's in this sequence).
Cf. A051950 (one of the matches not matched by A046523 alone).

Programs

  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286255(n) = (2 + ((A046523(n)+A046523(1+n))^2) - A046523(n) - 3*A046523(1+n))/2;
    for(n=1, 10000, write("b286255.txt", n, " ", A286255(n)));
    
  • Python
    from sympy import factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(a046523(n), a046523(n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286255 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 1 n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 1 n)))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A046523(n)+A046523(1+n))^2) - A046523(n) - 3*A046523(1+n)).

A286242 Compound filter: a(n) = P(A278222(n), A278219(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 12, 14, 12, 84, 40, 44, 12, 142, 216, 183, 40, 265, 86, 152, 12, 142, 826, 265, 216, 1860, 607, 489, 40, 832, 607, 1117, 86, 619, 226, 560, 12, 142, 826, 265, 826, 5080, 2497, 619, 216, 2956, 4308, 4155, 607, 8575, 1105, 1533, 40, 832, 2497, 2116, 607, 5731, 4501, 3475, 86, 1402, 1105, 3475, 226, 1759, 698, 2144, 12, 142, 826, 265, 826, 5080, 2497, 619, 826
Offset: 0

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A003188(n) = bitxor(n, n>>1);
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A278222(n) = A046523(A005940(1+n));
    A278219(n) = A278222(A003188(n));
    A286242(n) = (2 + ((A278222(n)+A278219(n))^2) - A278222(n) - 3*A278219(n))/2;
    for(n=0, 16383, write("b286242.txt", n, " ", A286242(n)));
    
  • Python
    from sympy import prime, factorint
    import math
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def P(n):
        f=factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a003188(n): return n^(n>>1)
    def a243353(n): return a005940(1 + a003188(n))
    def a278219(n): return a046523(a243353(n))
    def a278222(n): return a046523(a005940(n + 1))
    def a(n): return T(a278222(n), a278219(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286242 n) (* (/ 1 2) (+ (expt (+ (A278222 n) (A278219 n)) 2) (- (A278222 n)) (- (* 3 (A278219 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A278222(n)+A278219(n))^2) - A278222(n) - 3*A278219(n)).
a(n) = (1/2)*(2 + ((A278222(n)+A278222(A003188(n)))^2) - A278222(n) - 3*A278222(A003188(n))).

A286241 Compound filter: a(n) = P(A278219(n), A278219(1+n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

2, 12, 14, 12, 59, 86, 27, 12, 109, 363, 269, 86, 142, 148, 27, 12, 109, 1093, 1117, 363, 1097, 1517, 489, 86, 601, 1408, 619, 148, 142, 148, 27, 12, 109, 1093, 1117, 1093, 5707, 8587, 2545, 363, 1969, 6153, 4529, 1517, 4489, 4537, 489, 86, 601, 3946, 3976, 1408, 2509, 5719, 2545, 148, 601, 1408, 619, 148, 142, 148, 27, 12, 109, 1093, 1117, 1093, 5707, 8587
Offset: 0

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; g[n_] := If[n == 1, 1, Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]]; h[n_] := g@ f[BitXor[n, Floor[n/2]], 1, 1]; Map[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ # & /@ # &, Table[{h[n], h[n + 1]}, {k, 12}, {n, k (k - 1)/2, k (k + 1)/2 - 1}]] // Flatten (* Michael De Vlieger, May 09 2017 *)
  • PARI
    A003188(n) = bitxor(n, n>>1);
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A278222(n) = A046523(A005940(1+n));
    A278219(n) = A278222(A003188(n));
    A286241(n) = (2 + ((A278219(n)+A278219(1+n))^2) - A278219(n) - 3*A278219(1+n))/2;
    for(n=0, 16383, write("b286241.txt", n, " ", A286241(n)));
    
  • Python
    from sympy import prime, factorint
    import math
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a003188(n): return n^int(n/2)
    def a243353(n): return a005940(1 + a003188(n))
    def a278219(n): return a046523(a243353(n))
    def a(n): return T(a278219(n), a278219(n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286241 n) (* (/ 1 2) (+ (expt (+ (A278219 n) (A278219 (+ 1 n))) 2) (- (A278219 n)) (- (* 3 (A278219 (+ 1 n)))) 2)))
    

Formula

a(n) = (1/2)*(2+((A278219(n)+A278219(1+n))^2) - A278219(n) - 3*A278219(1+n)).
Showing 1-4 of 4 results.