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 41-50 of 2208 results. Next

A364558 a(n) = A364557(n) - A000010(n), where A364557 is the Möbius transform of A005941, and A000010 (Euler phi) is the Möbius transform of A000027.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 6, 0, 20, 2, -4, 0, 48, -2, 110, 0, -4, 6, 234, 0, -12, 20, -10, 4, 484, -4, 994, 0, -4, 48, -16, -4, 2012, 110, 8, 0, 4056, -4, 8150, 12, -16, 234, 16338, 0, -26, -12, 32, 40, 32716, -10, -24, 8, 92, 484, 65478, -8, 131012, 994, -20, 0, -16, -4, 262078, 96, 212, -16, 524218, -8, 1048504
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Crossrefs

Cf. A000010, A005941, A364557, A364559 (inverse Möbius transform), A364565 (positions of 0's), A364566 (of terms < 0).

Programs

  • PARI
    A364558(n) = (A364557(n)-eulerphi(n));
    
  • Python
    from math import prod
    from sympy import factorint, primepi
    def A364558(n): return (1<1 else 0 # Chai Wah Wu, Jul 29 2023

A131042 Natural numbers A000027 with 6n+3 and 6n+4 terms swapped.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Sep 23 2007

Keywords

Programs

  • Mathematica
    LinearRecurrence[{1,0,0,0,0,1,-1},{1,2,4,3,5,6,7},80] (* Harvey P. Dale, Aug 26 2024 *)
  • PARI
    Vec(x*(1 + x + 2*x^2 - x^3 + 2*x^4 + x^5) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)) + O(x^100)) \\ Colin Barker, Apr 08 2017

Formula

a(n) = (24*floor(n/6)+3*n^2-3*n+8+9*floor(n/3)*(3*floor(n/3)-2*n+1)-(3*n^2-7*n+8+3*floor(n/3)*(9*floor(n/3)-6*n+7))*(-1)^floor(n/3))/4. - Luce ETIENNE, Apr 08 2017
From Colin Barker, Apr 08 2017: (Start)
G.f.: x*(1 + x + 2*x^2 - x^3 + 2*x^4 + x^5) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)).
a(n) = a(n-1) + a(n-6) - a(n-7) for n>7.
(End)

A185508 Third accumulation array, T, of the natural number array A000027, by antidiagonals.

Original entry on oeis.org

1, 5, 6, 16, 29, 21, 41, 89, 99, 56, 91, 219, 295, 259, 126, 182, 469, 705, 755, 574, 252, 336, 910, 1470, 1765, 1645, 1134, 462, 582, 1638, 2786, 3605, 3780, 3206, 2058, 792, 957, 2778, 4914, 6706, 7595, 7266, 5754, 3498, 1287, 1507, 4488, 8190, 11634, 13916, 14406, 12894, 9690, 5643, 2002, 2288, 6963, 13035, 19110, 23814, 26068, 25284, 21510, 15510, 8723, 3003, 3367, 10439, 19965, 30030, 38640, 44100
Offset: 1

Views

Author

Clark Kimberling, Jan 29 2011

Keywords

Comments

See A144112 (and A185506) for the definition of accumulation array (aa).
Sequence is aa(aa(aa(A000027))).

Examples

			Northwest corner:
   1    5   16   41   91  182
   6   29   89  219  469  910
  21   99  295  705 1470 2786
  56  259  755 1765 3605 6706
		

Crossrefs

Cf. A000389 (column 1), A257199 (row 1).

Programs

  • Mathematica
    h[n_,k_]:=k(k+1)(k+2)n(n+1)(n+2)*(4n^2+(5k+23)n+4k^2+3k+41)/2880;
    TableForm[Table[h[n,k],{n,1,10},{k,1,15}]]
    Table[h[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
  • PARI
    {h(n,k) = k*(k+1)*(k+2)*n*(n+1)*(n+2)*(4*n^2+(5*k+23)*n +4*k^2 +3*k + 41)/2880}; for(n=1,10, for(k=1,n, print1(h(k, n-k+1), ", "))) \\ G. C. Greubel, Nov 23 2017

Formula

T(n,k) = F*(4n^2 + (5k+23)n + 4k^2 + 3k+41), where F = k(k+1)(k+2)n(n+1)(n+2)/2880.

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

Original entry on oeis.org

1, 8, 3, 49, 8, 34, 3, 239, 124, 97, 8, 165, 30, 34, 34, 1051, 47, 1237, 17, 508, 21, 97, 8, 727, 565, 331, 74, 165, 122, 733, 3, 4403, 34, 502, 34, 7911, 192, 196, 72, 2302, 233, 526, 68, 508, 1237, 97, 8, 3051, 1774, 5368, 97, 1782, 380, 727, 97, 727, 51, 1231, 122, 3220, 498, 34, 288, 18019, 331, 733, 155, 2713, 34, 733, 47, 35317, 705, 1897, 873, 1047, 34
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

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]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A161942(n) = A000265(sigma(n));
    A286034(n) = (2 + ((A046523(n)+A161942(n))^2) - A046523(n) - 3*A161942(n))/2;
    for(n=1, 16384, write("b286034.txt", n, " ", A286034(n)));
    
  • Python
    from sympy import factorint, divisors, divisor_sigma
    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 a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
    def a161942(n): return a000265(divisor_sigma(n))
    def a(n): return T(a046523(n), a161942(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286034 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A161942 n)) 2) (- (A046523 n)) (- (* 3 (A161942 n))) 2)))
    

Formula

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

A286102 Square array A(n,k) read by antidiagonals: A(n,k) = T(lcm(n,k), gcd(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

1, 3, 3, 6, 5, 6, 10, 21, 21, 10, 15, 14, 13, 14, 15, 21, 55, 78, 78, 55, 21, 28, 27, 120, 25, 120, 27, 28, 36, 105, 34, 210, 210, 34, 105, 36, 45, 44, 231, 90, 41, 90, 231, 44, 45, 55, 171, 300, 406, 465, 465, 406, 300, 171, 55, 66, 65, 64, 63, 630, 61, 630, 63, 64, 65, 66, 78, 253, 465, 666, 820, 903, 903, 820, 666, 465, 253, 78, 91, 90, 561, 230, 1035, 324, 85, 324, 1035, 230, 561, 90, 91
Offset: 1

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 12 X 12 corner of the array:
   1,   3,   6,  10,   15,   21,   28,   36,   45,   55,   66,   78
   3,   5,  21,  14,   55,   27,  105,   44,  171,   65,  253,   90
   6,  21,  13,  78,  120,   34,  231,  300,   64,  465,  561,  103
  10,  14,  78,  25,  210,   90,  406,   63,  666,  230,  990,  117
  15,  55, 120, 210,   41,  465,  630,  820, 1035,  101, 1540, 1830
  21,  27,  34,  90,  465,   61,  903,  324,  208,  495, 2211,  148
  28, 105, 231, 406,  630,  903,   85, 1596, 2016, 2485, 3003, 3570
  36,  44, 300,  63,  820,  324, 1596,  113, 2628,  860, 3916,  375
  45, 171,  64, 666, 1035,  208, 2016, 2628,  145, 4095, 4950,  739
  55,  65, 465, 230,  101,  495, 2485,  860, 4095,  181, 6105, 1890
  66, 253, 561, 990, 1540, 2211, 3003, 3916, 4950, 6105,  221, 8778
  78,  90, 103, 117, 1830,  148, 3570,  375,  739, 1890, 8778,  265
		

Crossrefs

Cf. A000217 (row 1 and column 1), A001844 (main diagonal).

Programs

Formula

A(n,k) = T(lcm(n,k), gcd(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N x N to N.
A(n,k) = A(k,n), or equivalently, a(A038722(n)) = a(n). [Array is symmetric.]

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

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

Original entry on oeis.org

2, 5, 5, 25, 5, 27, 23, 44, 14, 61, 5, 117, 38, 27, 27, 226, 23, 90, 23, 90, 27, 142, 5, 375, 40, 27, 86, 148, 5, 495, 80, 698, 27, 61, 27, 702, 80, 61, 27, 765, 5, 625, 23, 90, 148, 61, 23, 1224, 109, 90, 27, 832, 5, 324, 61, 324, 61, 142, 23, 2013, 23, 84, 90, 2410, 27, 625, 302, 90, 27, 625, 23, 2998, 80, 27, 90, 265, 61, 495, 23, 1426, 152, 601, 5, 2013, 142, 27, 142
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A005384 (gives the positions of 5's), A234095 (of 23's).

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
    A286258(n) = (1/2)*(2 + ((A046523(n)+A046523((2*n)+1))^2) - A046523(n) - 3*A046523((2*n)+1));
    for(n=1, 10000, write("b286258.txt", n, " ", A286258(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(2*n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286258 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 1 n n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 1 n n)))) 2)))
    

Formula

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

A286465 Compound filter: a(1) = 1, a(n) = P(A112049(n-1), A278223(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 2, 5, 12, 2, 2, 23, 5, 2, 16, 9, 18, 29, 2, 5, 23, 16, 2, 23, 5, 2, 67, 9, 25, 16, 2, 23, 23, 2, 2, 80, 23, 2, 16, 14, 9, 67, 16, 5, 138, 2, 16, 23, 5, 16, 16, 31, 9, 67, 2, 5, 467, 2, 2, 23, 5, 16, 67, 40, 33, 16, 29, 5, 23, 2, 16, 302, 5, 2, 16, 31, 31, 67, 2, 5, 80, 16, 2, 23, 23, 2, 436, 9, 42, 67, 2, 80, 23, 2, 2, 23, 23, 16, 277, 14, 9, 436, 2, 5
Offset: 1

Views

Author

Antti Karttunen, May 10 2017

Keywords

Comments

After a(1) = 1, the information combined together to a(n) consists of A046523(2n-1), giving essentially the prime signature of 2n-1, and the index of the first prime p >= 1 for which the Jacobi symbol J(p,2n-1) is not +1 (i.e. is either 0 or -1), the value which is returned by A112049(n-1).

Crossrefs

Programs

  • PARI
    A112049(n) = for(i=1,(2*n),if((kronecker(i,(n+n+1)) < 1),return(primepi(i))));
    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
    A286465(n) = if(1==n,n,(1/2)*(2 + ((A112049(n-1)+A046523((2*n)-1))^2) - A112049(n-1) - 3*A046523((2*n)-1)));
    for(n=1, 10000, write("b286465.txt", n, " ", A286465(n)));
    
  • Python
    from sympy import jacobi_symbol as J, factorint, isprime, primepi
    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 a278223(n): return a046523(2*n - 1)
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a049084(n): return primepi(n) if isprime(n) else 0
    def a112046(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    def a112049(n): return a049084(a112046(n))
    def a(n): return 1 if n==1 else T(a112049(n - 1), a278223(n)) # Indranil Ghosh, May 11 2017
  • Scheme
    (define (A286465 n) (if (= 1 n) n (* (/ 1 2) (+ (expt (+ (A112049 (- n 1)) (A046523 (+ -1 n n))) 2) (- (A112049 (- n 1))) (- (* 3 (A046523 (+ -1 n n)))) 2))))
    

Formula

a(1) = 1; for n > 1, a(n) = (1/2)*(2 + ((A112049(n-1)+A046523((2*n)-1))^2) - A112049(n-1) - 3*A046523((2*n)-1)).

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

Original entry on oeis.org

1, 2, 5, 7, 14, 23, 9, 29, 42, 40, 65, 80, 90, 31, 40, 121, 44, 142, 189, 109, 61, 115, 77, 302, 273, 148, 318, 94, 434, 532, 20, 497, 115, 86, 148, 826, 702, 271, 148, 355, 230, 601, 119, 220, 265, 131, 299, 1178, 297, 485, 86, 265, 1430, 838, 320, 328, 271, 556, 1769, 1957, 1890, 50, 142, 2017, 148, 751, 2277, 179, 373, 832, 665, 2932, 54, 856, 485
Offset: 1

Views

Author

Antti Karttunen, May 26 2017

Keywords

Crossrefs

Programs

  • PARI
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ This function from Michel Marcus, Apr 11 2015
    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
    A286573(n) = (1/2)*(2 + ((A007733(n)+A046523(n))^2) - A007733(n) - 3*A046523(n));
    
  • Python
    from sympy import divisors, factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a002326(n):
        m=1
        while True:
            if (2**m - 1)%(2*n + 1)==0: return m
            else: m+=1
    def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
    def a007733(n): return a002326((a000265(n) - 1)/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(a007733(n), a046523(n)) # Indranil Ghosh, May 26 2017

Formula

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

A290990 p-INVERT of the nonnegative integers (A000027), where p(S) = 1 - S - S^2.

Original entry on oeis.org

0, 1, 2, 5, 12, 28, 64, 145, 328, 743, 1686, 3830, 8704, 19781, 44950, 102133, 232048, 527208, 1197808, 2721421, 6183108, 14048151, 31917714, 72517738, 164761792, 374342057, 850512458, 1932380869, 4390407092, 9975090996, 22663602720, 51492150953
Offset: 0

Views

Author

Clark Kimberling, Aug 21 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A290890 for a guide to related sequences.

Crossrefs

Programs

  • Magma
    I:=[0,1,2,5]; [n le 4 select I[n] else 4*Self(n-1) -5*Self(n-2) +2*Self(n-3) +Self(n-4): n in [1..50]]; // G. C. Greubel, Apr 12 2023
    
  • Mathematica
    z = 60; s = x^2/(1-x)^2; p = 1 -s -s^2;
    Drop[CoefficientList[Series[s, {x,0,z}], x], 1] (* A000027 *)
    Drop[CoefficientList[Series[1/p, {x,0,z}], x], 1]  (* A290990 *)
    LinearRecurrence[{4,-5,2,1}, {0,1,2,5}, 50] (* G. C. Greubel, Apr 12 2023 *)
  • PARI
    concat(0, Vec(x*(1-2*x+2*x^2)/(1-4*x+5*x^2-2*x^3-x^4) + O(x^50))) \\ Colin Barker, Aug 24 2017
    
  • SageMath
    @CachedFunction
    def a(n): # a = A290990
        if (n<4): return (0,1,2,5)[n]
        else: return 4*a(n-1) -5*a(n-2) +2*a(n-3) +a(n-4)
    [a(n) for n in range(51)] # G. C. Greubel, Apr 12 2023

Formula

a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3) + a(n-4).
G.f.: x*(1 - 2*x + 2*x^2) / (1 - 4*x + 5*x^2 - 2*x^3 - x^4). - Colin Barker, Aug 24 2017
Previous Showing 41-50 of 2208 results. Next