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 31-40 of 2208 results. Next

A136120 Limiting sequence when we start with the positive integers (A000027) and at step n >= 1 delete the a(n) terms at positions n+a(n) to n-1+2*a(n).

Original entry on oeis.org

1, 3, 4, 5, 9, 10, 15, 16, 22, 23, 24, 25, 26, 36, 37, 48, 49, 50, 51, 52, 53, 69, 70, 87, 88, 89, 90, 91, 92, 93, 116, 117, 141, 142, 167, 168, 194, 195, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 269, 270, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 16 2008

Keywords

Examples

			First few steps are:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 1, a(1) = 1; delete terms at positions 2 to 2; this is 2;
1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 2,a(2) = 3; delete terms at positions 5 to 7; these are 6,7,8;
1,3,4,5,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 3, a(3) = 4; delete terms at positions 7 to 10; these are 11,12,13,14;
1,3,4,5,9,10,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...
n = 4, a(4) = 5; delete terms at positions 9 to 13; these are 17,18,19,20,21;
1,3,4,5,9,10,15,16,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36...
n = 5 a(5) = 9; delete terms at positions 14 to 22; these are 27,28,29,30,31,32,33,34,35;
1,3,4,5,9,10,15,16,22,23,24,25,26,36,...
		

Crossrefs

Programs

  • Mathematica
    f[seq_] := Module[{s = seq, n1, n2}, n++; n1 = s[[n]] + n; If[n1 <= len, n2 = Min[n - 1 + 2*s[[n]], len]; len -= n2 - n1 + 1; Drop[s, {n1, n2}], s]]; n = 0; len = 1000; FixedPoint[f, Range[len]] (* Jean-François Alcover, Sep 29 2011 *)

Extensions

Edited and extended by Klaus Brockhaus, Apr 20 2008

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

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

Original entry on oeis.org

3, 2, 9, 7, 5, 16, 14, 29, 12, 16, 9, 67, 5, 16, 50, 121, 5, 67, 9, 67, 23, 16, 14, 277, 12, 16, 48, 67, 5, 436, 27, 497, 23, 16, 31, 631, 5, 16, 40, 277, 5, 436, 9, 67, 80, 16, 20, 1129, 12, 67, 31, 67, 5, 277, 40, 277, 23, 16, 9, 1771, 5, 16, 160, 2017, 23, 436, 9, 67, 23, 436, 14, 2557, 5, 16, 94, 67, 23, 436, 20, 1129, 138, 16, 9, 1771, 23, 16, 40, 277, 5
Offset: 1

Views

Author

Antti Karttunen, May 07 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
    A286251(n) = (2 + ((A001511(1+n)+A046523(n))^2) - A001511(1+n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286251.txt", n, " ", A286251(n)));
    
  • Python
    from sympy import factorint
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("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(a001511(n + 1), a046523(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286251 n) (* (/ 1 2) (+ (expt (+ (A001511 (+ 1 n)) (A046523 n)) 2) (- (A001511 (+ 1 n))) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

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

Original entry on oeis.org

1, 8, 1, 39, 4, 8, 1, 157, 79, 47, 4, 39, 22, 8, 4, 600, 37, 782, 11, 256, 1, 47, 4, 157, 466, 233, 11, 39, 106, 47, 1, 2284, 4, 380, 4, 4281, 172, 122, 22, 1132, 211, 8, 56, 256, 742, 47, 4, 600, 1597, 4373, 37, 1278, 352, 122, 37, 157, 11, 1037, 106, 256, 466, 8, 79, 8785, 211, 47, 137, 2083, 4, 47, 37, 19507, 667, 1655, 466, 669, 4, 233, 11, 4661, 7261
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A000265(n) = (n >> valuation(n, 2));
    A161942(n) = A000265(sigma(n));
    A286260(n) = (2 + ((A001511(n)+A161942(n))^2) - A001511(n) - 3*A161942(n))/2;
    for(n=1, 16384, write("b286260.txt", n, " ", A286260(n)));
    
  • Python
    from sympy import factorint, divisors, divisor_sigma
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
    def a161942(n): return a000265(divisor_sigma(n))
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), a161942(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286260 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A161942 n)) 2) (- (A001511 n)) (- (* 3 (A161942 n))) 2)))
    

Formula

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

A286460 Compound filter (2-adic valuation & sum of the divisors): a(n) = P(A001511(n), A000203(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 8, 7, 39, 16, 80, 29, 157, 79, 173, 67, 438, 92, 302, 277, 600, 154, 782, 191, 949, 497, 668, 277, 1957, 466, 905, 781, 1656, 436, 2630, 497, 2284, 1129, 1487, 1129, 4281, 704, 1832, 1541, 4282, 862, 4658, 947, 3658, 3004, 2630, 1129, 8133, 1597, 4373, 2557, 4953, 1432, 7262, 2557, 7507, 3161, 4097, 1771, 14368, 1892, 4658, 5357, 8785, 3487, 10442, 2279
Offset: 1

Views

Author

Antti Karttunen, May 10 2017

Keywords

Crossrefs

Cf. A000593, A146076 (sequences matching to this filter), also A000203, A161942, A286260, A286357.

Programs

  • PARI
    A000203(n) = sigma(n);
    A001511(n) = (1+valuation(n,2));
    A286460(n) = (1/2)*(2 + ((A001511(n)+A000203(n))^2) - A001511(n) - 3*A000203(n));
    for(n=1, 10000, write("b286460.txt", n, " ", A286460(n)));
    
  • Python
    from sympy import divisor_sigma as D
    def a001511(n): return bin(n)[2:][::-1].index("1") + 1
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def a(n): return T(a001511(n), D(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286460 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A000203 n)) 2) (- (A001511 n)) (- (* 3 (A000203 n))) 2)))
    

Formula

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

A286560 Compound filter (summands of A004001 & summands of A005185): a(n) = P(A286541(n), A286559(n)), where P(n,k) is sequence A000027 used as a pairing function, with a(1) = a(2) = 0.

Original entry on oeis.org

0, 0, 1, 2, 5, 41, 71, 71, 198, 313, 484, 922, 1153, 1201, 2105, 1565, 2588, 4046, 5001, 7443, 7443, 8851, 10671, 19589, 16570, 16935, 22254, 25313, 25313, 25313, 42891, 28793, 32768, 52795, 65504, 59178, 73355, 89033, 88632, 107660, 129045, 129045, 153471, 167646, 167646, 182446, 182446, 336130, 197244, 233297, 330472, 307358, 270167, 355325, 378466, 332156
Offset: 1

Views

Author

Antti Karttunen, May 18 2017

Keywords

Crossrefs

Programs

Formula

a(1) = a(2) = 0, for n > 2, a(n) = (1/2)*(2 + ((A286541(n)+A286559(n))^2) - A286541(n) - 3*A286559(n)).

A291756 Compound filter: a(n) = P(A003557(n), A000010(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 1, 2, 5, 7, 2, 16, 25, 31, 7, 46, 12, 67, 16, 29, 113, 121, 31, 154, 38, 67, 46, 232, 59, 281, 67, 334, 80, 379, 29, 436, 481, 191, 121, 277, 142, 631, 154, 277, 175, 781, 67, 862, 212, 328, 232, 1036, 261, 1135, 281, 497, 302, 1327, 334, 781, 355, 631, 379, 1654, 138, 1771, 436, 706, 1985, 1129, 191, 2146, 530, 947, 277, 2416, 607, 2557, 631, 951, 668, 1771
Offset: 1

Views

Author

Antti Karttunen, Sep 10 2017

Keywords

Crossrefs

Programs

Formula

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

A293225 Compound filter: a(n) = P(A293224(n), A293223(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 2, 5, 2, 8, 2, 12, 4, 13, 2, 32, 2, 40, 30, 33, 2, 59, 2, 58, 42, 69, 2, 143, 8, 80, 29, 83, 2, 178, 2, 197, 38, 96, 25, 239, 2, 100, 121, 163, 2, 221, 2, 202, 194, 103, 2, 448, 61, 365, 59, 245, 2, 333, 48, 576, 187, 256, 2, 720, 2, 278, 546, 718, 138, 606, 2, 503, 114, 1009, 2, 1101, 2, 437, 651, 678, 532, 831, 2, 1400, 172, 213, 2, 1508, 71, 500, 597
Offset: 1

Views

Author

Antti Karttunen, Oct 03 2017

Keywords

Crossrefs

Cf. A000027, A019565, A293221, A293222, A293223, A293224, A293226 (rgs-version of this filter).

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; };
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
    A289813(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); };
    A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); };
    A293221(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289813(d)))); m; };
    A293222(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289814(d)))); m; };
    v293223 = rgs_transform(vector(19683,n,A293221(n)));
    A293223(n) = v293223[n];
    v293224 = rgs_transform(vector(19683,n,A293222(n)));
    A293224(n) = v293224[n];
    A293225(n) = (1/2)*(2 + ((A293224(n) + A293223(n))^2) - A293224(n) - 3*A293223(n));
    
  • Scheme
    (define (A293225 n) (* 1/2 (+ (expt (+ (A293224 n) (A293223 n)) 2) (- (A293224 n)) (- (* 3 (A293223 n))) 2)))

Formula

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

A349432 Dirichlet convolution of A000027 (the identity function) with A349134 (Dirichlet inverse of Kimberling's paraphrases).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 4, 2, 2, 5, 2, 6, 3, 0, 8, 8, 2, 9, 4, 0, 5, 11, 4, 6, 6, 4, 6, 14, 0, 15, 16, 0, 8, 0, 4, 18, 9, 0, 8, 20, 0, 21, 10, -2, 11, 23, 8, 12, 6, 0, 12, 26, 4, 0, 12, 0, 14, 29, 0, 30, 15, -3, 32, 0, 0, 33, 16, 0, 0, 35, 8, 36, 18, -4, 18, 0, 0, 39, 16, 8, 20, 41, 0, 0, 21, 0, 20, 44, -2, 0, 22, 0, 23
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Crossrefs

Cf. A003602, A055615, A349134, A349431 (Dirichlet inverse), A349433 (sum with it).
Cf. also A349445, A349448.

Programs

  • Mathematica
    k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; kinv[1] = 1; kinv[n_] := kinv[n] = -DivisorSum[n, kinv[#] * k[n/#] &, # < n &]; a[n_] := DivisorSum[n, # * kinv[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 18 2021 *)
  • PARI
    up_to = 16384;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA003602(n) = (1+(n>>valuation(n,2)))/2;
    v349134 = DirInverseCorrect(vector(up_to,n,A003602(n)));
    A349134(n) = v349134[n];
    A003602(n) = (1+(n>>valuation(n,2)))/2;
    A055615(n) = (n*moebius(n));
    A349432(n) = sumdiv(n,d,d*A349134(n/d));
Previous Showing 31-40 of 2208 results. Next