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-4 of 4 results.

A286458 Compound filter: a(n) = P(A286448(n), A286449(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 1, 2, 3, 13, 25, 24, 15, 61, 5, 85, 113, 112, 64, 87, 55, 201, 243, 242, 313, 204, 393, 451, 513, 137, 22, 613, 250, 723, 651, 842, 276, 67, 844, 196, 1015, 1107, 657, 196, 1253, 1355, 1020, 1407, 559, 812, 795, 1744, 1864, 833, 2051, 1062, 101, 2181, 1363, 2384, 2524, 597, 2741, 2891, 3045, 3203, 1935, 1756, 1081, 1249, 1938, 3703, 1534, 441
Offset: 1

Views

Author

Antti Karttunen, May 14 2017

Keywords

Comments

For all i, j: a(i) = a(j) => A286385(i) = A286385(j).

Crossrefs

Programs

Formula

a(n) = (1/2)*(2 + ((A286448(n)+A286449(n))^2) - A286448(n) - 3*A286449(n)).
a(n) = A286459(A048673(n)).

A252748 a(n) = A003961(n) - 2*n.

Original entry on oeis.org

-1, -1, -1, 1, -3, 3, -3, 11, 7, 1, -9, 21, -9, 5, 5, 49, -15, 39, -15, 23, 13, -5, -17, 87, -1, -1, 71, 43, -27, 45, -25, 179, -1, -11, 7, 153, -33, -7, 7, 109, -39, 81, -39, 29, 85, -5, -41, 309, 23, 47, -7, 49, -47, 267, -19, 185, 1, -23, -57, 195, -55, -13, 149, 601, -11, 63, -63, 35, 7, 91, -69, 531, -67, -25, 95, 55, -11, 99
Offset: 1

Views

Author

Antti Karttunen, Dec 21 2014

Keywords

Crossrefs

Partial sums: A252749.
Cf. A246282 (positions of the positive terms), A252742 (their characteristic function).

Programs

  • Mathematica
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[n == 1] - 2 n, {n, 78}] (* Michael De Vlieger, May 14 2017 *)
  • Scheme
    (define (A252748 n) (- (A003961 n) (* 2 n)))

Formula

a(n) = A003961(n) - 2*n.
a(n) = A252750(A156552(n)).
a(n) = A286385(n) - A033879(n). - Antti Karttunen, May 13 2017
Other identities. For all n >= 1:
sign(a(n)) = (-1)^(1+A252742(n)).

A286449 Restricted growth sequence computed for A033879 (deficiency), or equally, for A033880 (abundance of n).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 5, 1, 6, 2, 7, 8, 9, 3, 5, 1, 10, 11, 12, 13, 7, 14, 15, 16, 17, 7, 18, 4, 19, 16, 20, 1, 12, 18, 15, 21, 22, 10, 15, 23, 24, 16, 25, 3, 9, 26, 27, 28, 29, 30, 20, 5, 31, 16, 32, 33, 34, 35, 36, 37, 38, 19, 15, 1, 27, 16, 39, 7, 25, 8, 40, 41, 42, 34, 35, 9, 36, 16, 43, 44, 29, 32, 45, 46, 47, 24, 48, 8, 49, 50, 40, 10, 36, 51, 40, 52, 53
Offset: 1

Views

Author

Antti Karttunen, May 13 2017

Keywords

Examples

			We start by setting a(1) = 1 for A033879(1) = 1. Then, whenever A033879(k) is equal to some A033879(m) with m < k, we set a(k) = a(m). Otherwise (when the value is a new one, not encountered before), we allot for a(k) the least natural number not present among a(1) .. a(k-1).
For n=2, as A033879(2) = 1, which was already present at A033879(1), we set a(2) = a(1) = 1.
For n=3, as A033879(3) = 2, which is a new value not encountered before, we set a(3) = 1 + max(a(1),a(2)) = 2.
For n=4, as A033879(4) = 1, which was already present at n = 2 and n = 1, we set a(4) = a(1) = 1.
For n=5, as A033879(5) = 4, which is a new value not encountered before, we set a(5) = 1 + max(a(1),a(2),a(3),a(4)) = 3.
For n=12, as A033879(12) = -4, which is a new value not encountered before, we set a(12) = 1 + max(a(1),...,a(11)) = 8. Note that the sign matters here; -4 is not equal to +4, which was encountered already at n=5.
		

Crossrefs

Programs

  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,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])); }
    A033879(n) = ((2*n)-sigma(n));
    write_to_bfile(1,rgs_transform(vector(10000,n,A033879(n))),"b286449.txt");

A286450 Restricted growth sequence computed for A252750.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 13 2017

Keywords

Crossrefs

Programs

  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,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])); }
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ This function from Michel Marcus
    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
    A252750(n) = (A003961(A005940(n+1)) - (2 * A005940(n+1)));
    write_to_bfile(1,rgs_transform(vector(10000,n,A252750(n))),"b286450.txt");
Showing 1-4 of 4 results.