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.

Previous Showing 11-15 of 15 results.

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

Original entry on oeis.org

0, 2, 2, 12, 2, 40, 2, 59, 18, 61, 2, 179, 2, 86, 73, 261, 2, 265, 2, 265, 100, 148, 2, 757, 33, 185, 129, 367, 2, 1297, 2, 1097, 166, 271, 131, 1735, 2, 320, 205, 1105, 2, 1741, 2, 619, 517, 430, 2, 3113, 52, 850, 295, 769, 2, 1747, 205, 1517, 346, 625, 2, 5297, 2, 698, 730, 4497, 248, 2821, 2, 1117, 460, 2821, 2, 7069, 2, 941, 1070, 1315, 248, 3457, 2, 4513
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {n - EulerPhi@ n, Times @@ MapIndexed[Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1]}, {n, 80}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A051953(n) = (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
    A286152(n) = (2 + ((A051953(n)+A046523(n))^2) - A051953(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286152.txt", n, " ", A286152(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(n - totient(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286152 n) (* (/ 1 2) (+ (expt (+ (A051953 n) (A046523 n)) 2) (- (A051953 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

0, 1, 5, 2, 18, 2, 40, 7, 23, 7, 96, 7, 142, 16, 38, 29, 238, 16, 308, 29, 80, 46, 444, 29, 234, 67, 173, 67, 676, 29, 791, 121, 212, 121, 328, 67, 1093, 154, 302, 121, 1339, 67, 1499, 191, 302, 232, 1785, 121, 994, 191, 530, 277, 2227, 154, 864, 277, 668, 379, 2718, 121, 2944, 436, 668, 497, 1228, 191, 3505, 497, 992, 277, 3936, 277, 4207, 631, 822, 631
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {If[n == 1, 0, PrimePi[ FactorInteger[n][[1, 1]] ]], EulerPhi@ n}, {n, 76}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A000010(n) = eulerphi(n);
    A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from Charles R Greathouse IV, Apr 23 2015
    A286154(n) = (2 + ((A055396(n)+A000010(n))^2) - A055396(n) - 3*A000010(n))/2;
    for(n=1, 10000, write("b286154.txt", n, " ", A286154(n)));
    
  • Python
    from sympy import primepi, isprime, primefactors, totient
    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 a(n): return T(a055396(n), totient(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286154 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A000010 n)) 2) (- (A055396 n)) (- (* 3 (A000010 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 5, 2, 18, 2, 23, 7, 59, 2, 23, 16, 94, 7, 80, 29, 195, 2, 23, 16, 94, 16, 467, 67, 355, 7, 80, 67, 706, 29, 302, 121, 672, 2, 23, 16, 94, 16, 467, 67, 355, 16, 467, 436, 1894, 67, 1832, 277, 1331, 7, 80, 67, 706, 67, 1832, 631, 2779, 29, 302, 277, 2704, 121, 1178, 497, 2422, 2, 23, 16, 94, 16, 467, 67, 355, 16, 467, 436, 1894, 67, 1832, 277, 1331, 16, 467, 436
Offset: 0

Views

Author

Antti Karttunen, May 07 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));
    A286252(n) = (2 + ((A001511(1+n)+A278222(n))^2) - A001511(1+n) - 3*A278222(n))/2;
    for(n=0, 16384, write("b286252.txt", n, " ", A286252(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 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n + 1), a278222(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286252 n) (* (/ 1 2) (+ (expt (+ (A001511 (+ 1 n)) (A278222 n)) 2) (- (A001511 (+ 1 n))) (- (* 3 (A278222 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 5, 8, 14, 17, 34, 30, 44, 19, 51, 68, 103, 93, 72, 196, 152, 155, 103, 192, 132, 72, 126, 278, 349, 32, 159, 53, 165, 437, 976, 498, 560, 709, 237, 786, 739, 705, 282, 159, 402, 863, 660, 948, 243, 337, 384, 1130, 1273, 49, 132, 1546, 288, 1433, 349, 126, 459, 282, 567, 1772, 2761, 1893, 636, 165, 2144, 2421, 1921, 2280, 390, 2707, 2046, 2558, 2773, 2703
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1], Denominator[EulerPhi[n]/n]}, {n, 73}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A109395(n) = n/gcd(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
    A286149(n) = (1/2)*(2 + ((A046523(n)+A109395(n))^2) - A046523(n) - 3*A109395(n));
    for(n=1, 10000, write("b286149.txt", n, " ", A286149(n)));
    
  • Python
    from sympy import factorint, totient, 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 a(n): return T(a046523(n), n/gcd(n, totient(n))) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286149 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A109395 n)) 2) (- (A046523 n)) (- (* 3 (A109395 n))) 2)))
    

Formula

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

A286259 Compound filter: a(n) = P(A001511(n), A049820(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 1, 6, 4, 5, 11, 25, 16, 23, 37, 31, 56, 57, 56, 110, 106, 80, 137, 123, 137, 173, 211, 175, 232, 255, 254, 279, 352, 255, 407, 471, 407, 467, 466, 409, 596, 597, 596, 599, 742, 597, 821, 783, 742, 905, 991, 866, 1036, 992, 1082, 1131, 1276, 1083, 1276, 1279, 1379, 1487, 1597, 1228, 1712, 1713, 1597, 1960, 1831, 1713, 2081, 2019, 2081, 1955, 2347, 1957
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A049820(n) = (n-numdiv(n));
    A286259(n) = (2 + ((A001511(n)+A049820(n))^2) - A001511(n) - 3*A049820(n))/2;
    for(n=1, 10000, write("b286259.txt", n, " ", A286259(n)));
    
  • Python
    from sympy import divisor_count as d
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), n - d(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286259 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A049820 n)) 2) (- (A001511 n)) (- (* 3 (A049820 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A049820(n))^2) - A001511(n) - 3*A049820(n)).
Previous Showing 11-15 of 15 results.