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

A286161 Compound filter: a(n) = T(A001511(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 2, 18, 2, 23, 2, 59, 7, 23, 2, 94, 2, 23, 16, 195, 2, 80, 2, 94, 16, 23, 2, 355, 7, 23, 29, 94, 2, 467, 2, 672, 16, 23, 16, 706, 2, 23, 16, 355, 2, 467, 2, 94, 67, 23, 2, 1331, 7, 80, 16, 94, 2, 302, 16, 355, 16, 23, 2, 1894, 2, 23, 67, 2422, 16, 467, 2, 94, 16, 467, 2, 2779, 2, 23, 67, 94, 16, 467, 2, 1331, 121, 23, 2, 1894, 16, 23, 16, 355, 2, 1832
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    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
    A286161(n) = (2 + ((A001511(n)+A046523(n))^2) - A001511(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286161.txt", n, " ", A286161(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 a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), a046523(n)) # Indranil Ghosh, May 06 2017
  • Scheme
    (define (A286161 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A046523 n)) 2) (- (A001511 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

A336158 The least number with the prime signature of the odd part of n: a(n) = A046523(A000265(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 2, 6, 1, 2, 4, 2, 2, 6, 2, 2, 2, 4, 2, 8, 2, 2, 6, 2, 1, 6, 2, 6, 4, 2, 2, 6, 2, 2, 6, 2, 2, 12, 2, 2, 2, 4, 4, 6, 2, 2, 8, 6, 2, 6, 2, 2, 6, 2, 2, 12, 1, 6, 6, 2, 2, 6, 6, 2, 4, 2, 2, 12, 2, 6, 6, 2, 2, 16, 2, 2, 6, 6, 2, 6, 2, 2, 12, 6, 2, 6, 2, 6, 2, 2, 4, 12, 4, 2, 6, 2, 2, 30
Offset: 1

Views

Author

Antti Karttunen, Jul 11 2020

Keywords

Crossrefs

Programs

  • PARI
    A000265(n) = (n>>valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A336158(n) = A046523(A000265(n));
    
  • Python
    from math import prod
    from sympy import factorint, prime
    def A336158(n): return prod(prime(i+1)**e for i,e in enumerate(sorted(factorint(n>>(~n&n-1).bit_length()).values(),reverse=True))) # Chai Wah Wu, Sep 16 2022

Formula

a(n) = A046523(A000265(n)) = A046523(A064989(n)).
A000005(a(n)) = A001227(n).
A001221(a(n)) = A005087(n).
A001222(a(n)) = A087436(n).

A278221 Filtering sequence (related to prime factorization): a(n) = A046523(A122111(n)).

Original entry on oeis.org

1, 2, 4, 2, 8, 6, 16, 2, 4, 12, 32, 6, 64, 24, 12, 2, 128, 6, 256, 12, 36, 48, 512, 6, 8, 96, 4, 24, 1024, 30, 2048, 2, 72, 192, 24, 6, 4096, 384, 144, 12, 8192, 60, 16384, 48, 12, 768, 32768, 6, 16, 12, 288, 96, 65536, 6, 72, 24, 576, 1536, 131072, 30, 262144, 3072, 36, 2, 216, 120, 524288, 192, 1152, 60, 1048576, 6, 2097152, 6144, 12, 384, 48, 240, 4194304, 12, 4
Offset: 1

Views

Author

Antti Karttunen, Nov 16 2016

Keywords

Crossrefs

Cf. also A278220.

Programs

Formula

a(n) = A046523(A122111(n)).

A278223 Least number with the same prime signature as the n-th odd number: a(n) = A046523(2n-1).

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 2, 6, 2, 2, 6, 2, 4, 8, 2, 2, 6, 6, 2, 6, 2, 2, 12, 2, 4, 6, 2, 6, 6, 2, 2, 12, 6, 2, 6, 2, 2, 12, 6, 2, 16, 2, 6, 6, 2, 6, 6, 6, 2, 12, 2, 2, 30, 2, 2, 6, 2, 6, 12, 6, 4, 6, 8, 2, 6, 2, 6, 24, 2, 2, 6, 6, 6, 12, 2, 2, 12, 6, 2, 6, 6, 2, 30, 2, 4, 12, 2, 12, 6, 2, 2, 6, 6, 6, 24, 2, 2, 30, 2, 2, 6, 6, 6, 12, 6, 2, 6, 6, 6, 6, 6, 2, 36, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Nov 16 2016

Keywords

Comments

This sequence works as a filter for sequences related to the prime factorization of odd numbers by matching to any sequence that is obtained as f(2*n - 1), where f(n) is any function that depends only on the prime signature of n (see the index entry for "sequences computed from exponents in ..."). The last line in Crossrefs section lists such sequences that were present in the database as of Nov 11 2016, although some of the matches might be spurious.

Crossrefs

Odd bisection of A046523.
Sequences that partition or seem to partition N into same or coarser equivalence classes: A099774, A100007, A193773, A101871, A158280, A158315, A158647, A285716.

Programs

  • Mathematica
    a[n_] := Times @@ (Prime[Range[Length[f = FactorInteger[2*n - 1]]]]^Sort[f[[;; , 2]], Greater]); a[1] = 1; Array[a, 100] (* Amiram Eldar, Jul 23 2023 *)
  • Python
    from sympy import factorint
    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(2*n - 1) # Indranil Ghosh, May 11 2017
    
  • Python
    from math import prod
    from sympy import prime, factorint
    def A278223(n): return prod(prime(i+1)**e for i,e in enumerate(sorted(factorint((n<<1)-1).values(),reverse=True))) # Chai Wah Wu, Sep 16 2022
  • Scheme
    (define (A278223 n) (A046523 (+ n n -1)))
    (define (A278223 n) (A046523 (A064216 n)))
    

Formula

a(n) = A046523(2n - 1).
a(n) = A046523(A064216(n)).
From Antti Karttunen, May 31 2017: (Start)
a(n) = A278222(A244153(n)).
a(n) = A278531(A245611(n)).
(End)

A286160 Compound filter: a(n) = T(A000010(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 5, 12, 14, 23, 27, 59, 42, 40, 65, 109, 90, 61, 86, 261, 152, 142, 189, 179, 148, 115, 275, 473, 273, 148, 318, 265, 434, 674, 495, 1097, 320, 226, 430, 1093, 702, 271, 430, 757, 860, 832, 945, 485, 619, 373, 1127, 1969, 1032, 485, 698, 619, 1430, 838, 1030, 1105, 856, 556, 1769, 2791, 1890, 625, 1117, 4497, 1426, 1196, 2277, 935, 1220
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Cf. for example A061468 (one of the sequences this matches with).

Programs

  • PARI
    A000010(n) = eulerphi(n);
    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
    A286160(n) = (2 + ((A000010(n)+A046523(n))^2) - A000010(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286160.txt", n, " ", A286160(n)));
    
  • Python
    from sympy import factorint, totient
    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(totient(n), a046523(n)) # Indranil Ghosh, May 06 2017
  • Scheme
    (define (A286160 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A046523 n)) 2) (- (A000010 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

A278219 Filter-sequence related to base-2 run-length encoding: a(n) = A046523(A243353(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 16 2016

Keywords

Crossrefs

Other base-2 related filter sequences: A278217, A278222.
Sequences that (seem to) partition N into same or coarser equivalence classes are at least these: A005811, A136004, A033264, A037800, A069010, A087116, A090079 and many others like A105500, A106826, A166242, A246960, A277561, A037834, A225081 although these have not been fully checked yet.

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]]];
    Table[g@ f[BitXor[n, Floor[n/2]], 1, 1], {n, 0, 93}] (* Michael De Vlieger, May 09 2017 *)
  • 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 a003188(n): return n^int(n/2)
    def a243353(n): return a005940(1 + a003188(n))
    def a(n): return a046523(a243353(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A278219 n) (A046523 (A243353 n)))
    

Formula

a(n) = A046523(A243353(n)).
a(n) = A278222(A003188(n)).
a(n) = A278220(1+A075157(n)).

A286163 Compound filter: a(n) = T(A046523(n), A278222(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

2, 5, 12, 14, 23, 42, 38, 44, 40, 61, 80, 117, 80, 84, 216, 152, 23, 148, 80, 148, 601, 142, 302, 375, 109, 142, 911, 183, 302, 1020, 530, 560, 61, 61, 142, 856, 467, 142, 412, 430, 467, 1741, 1832, 265, 2497, 412, 1178, 1323, 109, 265, 826, 265, 1832, 1735, 2932, 489, 412, 412, 2630, 2835, 1178, 672, 2787, 2144, 61, 625, 80, 148, 601, 850, 302, 2998, 467, 601
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • PARI
    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));
    A286163(n) = (2 + ((A046523(n)+A278222(n))^2) - A046523(n) - 3*A278222(n))/2;
    for(n=1, 10000, write("b286163.txt", n, " ", A286163(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 a278222(n): return a046523(a005940(n + 1))
    def a(n): return T(a046523(n), a278222(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286163 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A278222 n)) 2) (- (A046523 n)) (- (* 3 (A278222 n))) 2)))
    

Formula

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

A300226 Filter sequence combining A046523(n) and A052126(n), the prime signature of n and n/(largest prime dividing n).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 4, 2, 7, 2, 4, 8, 9, 2, 10, 2, 7, 8, 4, 2, 11, 12, 4, 13, 7, 2, 14, 2, 15, 8, 4, 16, 17, 2, 4, 8, 11, 2, 14, 2, 7, 18, 4, 2, 19, 20, 21, 8, 7, 2, 22, 16, 11, 8, 4, 2, 23, 2, 4, 18, 24, 16, 14, 2, 7, 8, 25, 2, 26, 2, 4, 27, 7, 28, 14, 2, 19, 29, 4, 2, 23, 16, 4, 8, 11, 2, 30, 28, 7, 8, 4, 16, 31, 2, 32, 18, 33, 2, 14, 2, 11, 34
Offset: 1

Views

Author

Antti Karttunen, Mar 01 2018

Keywords

Comments

Restricted growth sequence transform of P(A046523(n), A052126(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(6) = a(10) (= 4) because both are nonsquare semiprimes (2*3 and 2*5), and when the largest prime factor is divided out, both yield the same quotient, 2.
		

Crossrefs

Cf. also A291761, A300229.

Programs

  • PARI
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A052126(n) = if(1==n,n, my(f=factor(n)[, 1], gpf = f[#f]); n/gpf); \\ After code in A052126.
    Aux300226(n) = (1/2)*(2 + ((A052126(n)+A046523(n))^2) - A052126(n) - 3*A046523(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300226(n))),"b300226.txt");

A278531 a(n) = A046523(A163511(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 30 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A046523(A163511(n)).
a(n) = A278222(A054429(n)).

A295300 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A003557(n), A046523(n), A048250(n)].

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 44, 49, 50, 51, 44, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 58, 62, 65, 66, 67, 68, 69, 70, 58, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 80
Offset: 1

Views

Author

Antti Karttunen, Nov 19 2017

Keywords

Comments

Restricted growth sequence transform of A291752.
For all i, j:
a(i) = a(j) => A291751(i) = A291751(j),
a(i) = a(j) => A326199(i) = A326199(j) => A294877(i) = A294877(j),
a(i) = a(j) => A322021(i) = A322021(j),
a(i) = a(j) => A295888(i) = A295888(j),
a(i) = a(j) => A296090(i) = A296090(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A003557(n) = n/factorback(factor(n)[, 1]); \\ From A003557
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A048250(n) = if(n<1, 0, sumdiv(n, d, if(core(d)==d, d)));
    A291750(n) = (1/2)*(2 + ((A003557(n)+A048250(n))^2) - A003557(n) - 3*A048250(n));
    Aux295300(n) = (1/2)*(2 + ((A046523(n) + A291750(n))^2) - A046523(n) - 3*A291750(n));
    v295300 = rgs_transform(vector(up_to,n,Aux295300(n)));
    A295300(n) = v295300[n];

Extensions

Name changed and the comments section added by Antti Karttunen, Jul 13 2019
Showing 1-10 of 515 results. Next