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

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

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)).

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)).

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

Original entry on oeis.org

2, 5, 7, 9, 16, 12, 29, 14, 16, 23, 67, 18, 67, 38, 121, 20, 16, 23, 67, 31, 436, 80, 277, 25, 67, 80, 631, 48, 277, 138, 497, 27, 16, 23, 67, 31, 436, 80, 277, 40, 436, 467, 1771, 94, 1771, 302, 1129, 33, 67, 80, 631, 94, 1771, 668, 2557, 59, 277, 302, 2557, 156, 1129, 530, 2017, 35, 16, 23, 67, 31, 436, 80, 277, 40, 436, 467, 1771, 94, 1771, 302, 1129, 50
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

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

Formula

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

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

Original entry on oeis.org

0, 2, 5, 7, 9, 16, 14, 29, 12, 16, 20, 67, 27, 16, 23, 121, 35, 67, 44, 67, 23, 16, 54, 277, 18, 16, 38, 67, 65, 436, 77, 497, 23, 16, 31, 631, 90, 16, 23, 277, 104, 436, 119, 67, 80, 16, 135, 1129, 25, 67, 23, 67, 152, 277, 31, 277, 23, 16, 170, 1771, 189, 16, 80, 2017, 31, 436, 209, 67, 23, 436, 230, 2557, 252, 16, 80, 67, 40, 436, 275, 1129, 138, 16, 299
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
    A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from Charles R Greathouse IV, Apr 23 2015
    A286164(n) = (2 + ((A055396(n)+A046523(n))^2) - A055396(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286164.txt", n, " ", A286164(n)));
    
  • Python
    from sympy import primepi, isprime, primefactors, factorint
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    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(a055396(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286164 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A046523 n)) 2) (- (A055396 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 2, 2, 12, 2, 31, 2, 59, 18, 50, 2, 142, 2, 73, 50, 261, 2, 199, 2, 220, 73, 131, 2, 607, 33, 166, 129, 314, 2, 961, 2, 1097, 131, 248, 73, 1396, 2, 295, 166, 923, 2, 1246, 2, 550, 340, 401, 2, 2509, 52, 655, 248, 692, 2, 1252, 131, 1303, 295, 590, 2, 3946, 2, 661, 517, 4497, 166, 1924, 2, 1024, 401, 2051, 2, 5707, 2, 898, 655, 1214, 131, 2317, 2, 3781, 888
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {Sort[Flatten@ Apply[ TensorProduct, # /. {p_, e_} /; p > 1 :> p^Range[0, e]]][[-2]], Times @@ MapIndexed[Prime[First@ #2]^#1 &, Sort[#[[All, -1]], Greater]] - Boole[n == 1]} &@ FactorInteger@ n, {n, 81}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));
    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
    A285729(n) = (1/2)*(2 + ((A032742(n)+A046523(n))^2) - A032742(n) - 3*A046523(n));
    for(n=1, 10000, write("b285729.txt", n, " ", A285729(n)));
    
  • Python
    from sympy import divisors, factorint
    def a032742(n): return 1 if n==1 else max(divisors(n)[:-1])
    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(a032742(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A285729 n) (* (/ 1 2) (+ (expt (+ (A032742 n) (A046523 n)) 2) (- (A032742 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 5, 2, 12, 2, 31, 2, 38, 7, 23, 2, 94, 2, 23, 16, 138, 2, 94, 2, 80, 16, 23, 2, 328, 7, 23, 29, 80, 2, 532, 2, 530, 16, 23, 16, 706, 2, 23, 16, 302, 2, 499, 2, 80, 67, 23, 2, 1228, 7, 80, 16, 80, 2, 328, 16, 302, 16, 23, 2, 1957, 2, 23, 67, 2082, 16, 499, 2, 80, 16, 467, 2, 2704, 2, 23, 67, 80, 16, 499, 2, 1178, 121, 23, 2, 1894, 16, 23, 16, 302, 2, 1957, 16
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Differs from A286143 for the first time at n=24, where a(24) = 328, while A286143(24) = 355.

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 - Boole[n == 1] & @@ {Module[{i = 1}, While[! CoprimeQ[Prime@ i, n], i++]; i], Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]}, {n, 92}] (* Michael De Vlieger, May 04 2017 *)
  • 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
    A257993(n) = { for(i=1,n,if(n%prime(i),return(i))); }
    A286142(n) = (1/2)*(2 + ((A257993(n)+A046523(n))^2) - A257993(n) - 3*A046523(n));
    for(n=1, 10000, write("b286142.txt", n, " ", A286142(n)));
    
  • Python
    from sympy import factorint, prime, primepi, gcd
    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 a053669(n):
        x=1
        while True:
            if gcd(prime(x), n) == 1: return prime(x)
            else: x+=1
    def a257993(n): return primepi(a053669(n))
    def a(n): return T(a257993(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286142 n) (* (/ 1 2) (+ (expt (+ (A257993 n) (A046523 n)) 2) (- (A257993 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

A336159 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A336158(i) = A336158(j), for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 11 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A278222(n), A336158(n)], i.e., of the ordered pair [A046523(A005940(1+n)), A046523(A000265(n))].
For all i, j: A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A000265(n) = (n>>valuation(n,2));
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    A336158(n) = A046523(A000265(n));
    Aux336159(n) = [A278222(n), A336158(n)];
    v336159 = rgs_transform(vector(up_to, n, Aux336159(n)));
    A336159(n) = v336159[n];

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

Original entry on oeis.org

1, 5, 2, 12, 2, 31, 2, 38, 7, 23, 2, 94, 2, 23, 16, 138, 2, 94, 2, 80, 16, 23, 2, 355, 7, 23, 29, 80, 2, 499, 2, 530, 16, 23, 16, 706, 2, 23, 16, 302, 2, 499, 2, 80, 67, 23, 2, 1279, 7, 80, 16, 80, 2, 328, 16, 302, 16, 23, 2, 1894, 2, 23, 67, 2082, 16, 499, 2, 80, 16, 467, 2, 2779, 2, 23, 67, 80, 16, 499, 2, 1178, 121, 23, 2, 1894, 16, 23, 16, 302, 2, 1894, 16
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Differs from A286142 for the first time at n=24, where a(24) = 355, while A286142(24) = 328.

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 - Boole[n == 1] & @@ {Module[{m = 1}, While[Mod[n, m!] == 0, m++]; m - 1], Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]}, {n, 92}] (* Michael De Vlieger, May 04 2017, after Robert G. Wilson v at A055881 *)
  • 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
    A055881(n) = { my(i); i=2; while((0 == (n%i)), n = n/i; i++); return(i-1); }
    A286143(n) = (1/2)*(2 + ((A055881(n)+A046523(n))^2) - A055881(n) - 3*A046523(n));
    for(n=1, 10000, write("b286143.txt", n, " ", A286143(n)));
    
  • Python
    from sympy import factorial, 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 a055881(n):
        m = 1
        while n%factorial(m)==0:
            m+=1
        return m - 1
    def a(n): return T(a055881(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286143 n) (* (/ 1 2) (+ (expt (+ (A055881 n) (A046523 n)) 2) (- (A055881 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 2, 3, 5, 10, 8, 21, 14, 21, 14, 55, 19, 78, 27, 36, 44, 136, 34, 171, 44, 78, 65, 253, 53, 210, 90, 171, 90, 406, 63, 465, 152, 210, 152, 300, 103, 666, 189, 300, 152, 820, 103, 903, 230, 300, 275, 1081, 169, 903, 230, 528, 324, 1378, 208, 820, 324, 666, 434, 1711, 187, 1830, 495, 666, 560, 1176, 251, 2211, 560, 990, 324, 2485, 349, 2628, 702, 820, 702
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {EulerPhi@ n, Module[{i = 1}, While[! CoprimeQ[Prime@ i, n], i++]; i]}, {n, 74}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A000010(n) = eulerphi(n);
    A257993(n) = { for(i=1,n,if(n%prime(i),return(i))); }
    A286144(n) = (2 + ((A000010(n)+A257993(n))^2) - A000010(n) - 3*A257993(n))/2;
    for(n=1, 10000, write("b286144.txt", n, " ", A286144(n)));
    
  • Python
    from sympy import prime, primepi, gcd, totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a053669(n):
        x=1
        while True:
            if gcd(prime(x), n) == 1: return prime(x)
            else: x+=1
    def a257993(n): return primepi(a053669(n))
    def a(n): return T(totient(n), a257993(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286144 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A257993 n)) 2) (- (A000010 n)) (- (* 3 (A257993 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A000010(n)+A257993(n))^2) - A000010(n) - 3*A257993(n)).
Showing 1-10 of 15 results. Next