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

A286592 Compound filter (prime signature & deficiency/abundance): a(n) = P(A046523(n), A286449(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 3, 5, 10, 8, 42, 17, 36, 40, 27, 30, 183, 47, 34, 51, 136, 57, 243, 80, 288, 72, 177, 122, 765, 194, 72, 308, 117, 192, 1020, 212, 528, 142, 259, 196, 1576, 255, 111, 196, 1059, 302, 1020, 327, 103, 202, 471, 380, 2823, 500, 832, 306, 132, 498, 765, 672, 1564, 747, 786, 668, 4620, 743, 282, 337, 2080, 502, 1020, 782, 165, 441, 696, 822, 6288, 905, 747, 1047, 202
Offset: 1

Views

Author

Antti Karttunen, May 21 2017

Keywords

Comments

The lowermost conspicuous horizontal line in the scatter plot (at about log 3) is caused by value 1020, which corresponds to the prime signature 30 (p*q*r) and deficiency -12 packed together with the pairing function (as A002260(1020) = 30 and A004736(1020) = 16, A286449(24) = 16 and A033879(24) = -12). This value occurs in this sequence (at least) in the positions given by A138636, from its third term 30 onward.

Crossrefs

Programs

Formula

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

A286593 Compound filter (the length of rightmost run of 1's in base-2 & deficiency/abundance): a(n) = P(A089309(n), A286449(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 1, 5, 1, 4, 12, 24, 1, 16, 2, 30, 38, 37, 13, 32, 1, 46, 56, 80, 79, 22, 107, 139, 138, 137, 22, 173, 18, 172, 175, 281, 1, 67, 154, 122, 211, 232, 57, 139, 254, 277, 121, 327, 8, 37, 381, 439, 408, 407, 436, 212, 11, 466, 138, 564, 598, 562, 596, 668, 784, 704, 258, 196, 1, 352, 121, 782, 22, 301, 38, 864, 821, 862, 562, 632, 47, 631, 156, 1039, 947, 407
Offset: 1

Views

Author

Antti Karttunen, May 21 2017

Keywords

Crossrefs

Programs

Formula

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

A286595 Compound filter (2-adic valuation & deficiency/abundance): a(n) = P(A001511(n), A286449(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 3, 2, 6, 4, 12, 11, 10, 16, 5, 22, 48, 37, 8, 11, 15, 46, 68, 67, 108, 22, 107, 106, 175, 137, 30, 154, 18, 172, 138, 191, 21, 67, 173, 106, 256, 232, 57, 106, 329, 277, 138, 301, 13, 37, 353, 352, 501, 407, 467, 191, 24, 466, 138, 497, 634, 562, 632, 631, 744, 704, 192, 106, 28, 352, 138, 742, 39, 301, 38, 781, 950, 862, 597, 596, 58, 631, 138, 904, 1133, 407
Offset: 1

Views

Author

Antti Karttunen, May 21 2017

Keywords

Crossrefs

Programs

Formula

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

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

A033879 Deficiency of n, or 2n - (sum of divisors of n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 6, 1, 5, 2, 10, -4, 12, 4, 6, 1, 16, -3, 18, -2, 10, 8, 22, -12, 19, 10, 14, 0, 28, -12, 30, 1, 18, 14, 22, -19, 36, 16, 22, -10, 40, -12, 42, 4, 12, 20, 46, -28, 41, 7, 30, 6, 52, -12, 38, -8, 34, 26, 58, -48, 60, 28, 22, 1, 46, -12, 66, 10, 42, -4, 70, -51
Offset: 1

Views

Author

Keywords

Comments

Records for the sequence of the absolute values are in A075728 and the indices of these records in A074918. - R. J. Mathar, Mar 02 2007
a(n) = 1 iff n is a power of 2. a(n) = n - 1 iff n is prime. - Omar E. Pol, Jan 30 2014
If a(n) = 1 then n is called a least deficient number or an almost perfect number. All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2. See A000079. - Jianing Song, Oct 13 2019
It is not known whether there are any -1's in this sequence. See comment in A033880. - Antti Karttunen, Feb 02 2020

Examples

			For n = 10 the divisors of 10 are 1, 2, 5, 10, so the deficiency of 10 is 10 minus the sum of its proper divisors or simply 10 - 5 - 2 - 1 = 2. - _Omar E. Pol_, Dec 27 2013
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 147.

Crossrefs

Cf. A000396 (positions of zeros), A005100 (of positive terms), A005101 (of negative terms).
Cf. A141545 (positions of a(n) = -12).
For this sequence applied to various permutations of natural numbers and some other sequences, see A323174, A323244, A324055, A324185, A324546, A324574, A324575, A324654, A325379.

Programs

Formula

a(n) = -A033880(n).
a(n) = A005843(n) - A000203(n). - Omar E. Pol, Dec 14 2008
a(n) = n - A001065(n). - Omar E. Pol, Dec 27 2013
G.f.: 2*x/(1 - x)^2 - Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 24 2017
a(n) = A286385(n) - A252748(n). - Antti Karttunen, May 13 2017
From Antti Karttunen, Dec 29 2017: (Start)
a(n) = Sum_{d|n} A083254(d).
a(n) = Sum_{d|n} A008683(n/d)*A296075(d).
a(n) = A065620(A295881(n)) = A117966(A295882(n)).
a(n) = A294898(n) + A000120(n).
(End)
From Antti Karttunen, Jun 03 2019: (Start)
Sequence can be represented in arbitrarily many ways as a difference of the form (n - f(n)) - (g(n) - n), where f and g are any two sequences whose sum f(n)+g(n) = sigma(n). Here are few examples:
a(n) = A325314(n) - A325313(n) = A325814(n) - A034460(n) = A325978(n) - A325977(n).
a(n) = A325976(n) - A325826(n) = A325959(n) - A325969(n) = A003958(n) - A324044(n).
a(n) = A326049(n) - A326050(n) = A326055(n) - A326054(n) = A326044(n) - A326045(n).
a(n) = A326058(n) - A326059(n) = A326068(n) - A326067(n).
a(n) = A326128(n) - A326127(n) = A066503(n) - A326143(n).
a(n) = A318878(n) - A318879(n).
a(A228058(n)) = A325379(n). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - Pi^2/12 = 0.177532... . - Amiram Eldar, Dec 07 2023

Extensions

Definition corrected by N. J. A. Sloane, Jul 04 2005

A318310 Lexicographically earliest infinite sequence such that a(i) = a(j) => A000120(i) = A000120(j) and A033879(i) = A033879(j), for all i, j >= 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 25 2018

Keywords

Comments

Restricted growth sequence transform of ordered pair [A000120(n), A033879(n)], or equally, of ordered pair [A000120(n), A294898(n)].
For all i, j:
A318311(i) = A318311(j) => a(i) = a(j),
a(i) = a(j) => A286449(i) = A286449(j),
a(i) = a(j) => A294898(i) = A294898(j).
In the scatter plot one can see the effects of both base-2 related A000120 (binary weight of n) and prime factorization related A033879 (deficiency of n) graphically mixed: from the former, a square grid pattern, and from the latter the black rays that emanate from the origin. The same is true for A323898, while in the ordinal transform of this sequence, A331184, such effects are harder to visually discern. - Antti Karttunen, Jan 13 2020

Crossrefs

Cf. A318311, A323889, A323892, A323898, A324344, A324380, A324390 for similar constructions.
Cf. A331184 (ordinal transform).

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; };
    A318310aux(n) = [hammingweight(n), (2*n) - sigma(n)];
    v318310 = rgs_transform(vector(up_to,n,A318310aux(n)));
    A318310(n) = v318310[n];

Extensions

Name changed by Antti Karttunen, Jan 13 2020

A295882 Balanced ternary representation of the deficiency of n, A033879(n).

Original entry on oeis.org

1, 1, 5, 1, 4, 0, 15, 1, 17, 5, 10, 8, 12, 4, 15, 1, 52, 6, 45, 7, 10, 11, 49, 24, 46, 10, 53, 0, 28, 24, 30, 1, 45, 53, 49, 65, 36, 52, 49, 20, 40, 24, 159, 4, 12, 50, 154, 56, 161, 16, 30, 15, 142, 24, 41, 19, 43, 29, 139, 204, 150, 28, 49, 1, 154, 24, 147, 10, 159, 8, 106, 192, 99, 43, 29, 12, 139, 24, 87, 55
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2017

Keywords

Crossrefs

Cf. A000396 (gives the positions of zeros).

Programs

Formula

If A033879(n) >= 0, then a(n) = A117967(A033879(n)), otherwise a(n) = A117968(-A033879(n)).
For all n >= 1, A117966(a(n)) = A033879(n).

A286448 Restricted growth sequence computed for A252748 (= A003961(n) - 2*n).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 3, 5, 6, 2, 7, 8, 7, 9, 9, 10, 11, 12, 11, 13, 14, 15, 16, 17, 1, 1, 18, 19, 20, 21, 22, 23, 1, 24, 6, 25, 26, 27, 6, 28, 29, 30, 29, 31, 32, 15, 33, 34, 13, 35, 27, 10, 36, 37, 38, 39, 2, 40, 41, 42, 43, 44, 45, 46, 24, 47, 48, 49, 6, 50, 51, 52, 53, 22, 54, 55, 24, 56, 57, 58, 59, 60, 61, 62, 63, 64, 38, 65, 66, 67, 9, 68, 1, 69, 69, 70
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
    A252748(n) = (A003961(n) - (2*n));
    write_to_bfile(1,rgs_transform(vector(10000,n,A252748(n))),"b286448.txt");

A295881 Reversing binary representation of the deficiency of n, A033879(n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 14, 1, 13, 2, 26, 12, 28, 4, 14, 1, 16, 5, 50, 6, 26, 8, 62, 20, 55, 26, 22, 0, 44, 20, 38, 1, 50, 22, 62, 53, 100, 16, 62, 30, 104, 20, 122, 4, 28, 52, 118, 36, 121, 11, 38, 14, 84, 20, 110, 24, 98, 42, 74, 80, 76, 44, 62, 1, 118, 20, 194, 26, 122, 12, 206, 85, 200, 98, 42, 28, 74, 20, 214, 46, 121
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2017

Keywords

Comments

For all n, A010060(a(A005100(n))) = 1 and A010060(a(A023196(n))) = 0. That is, for the deficient numbers a(n) is an odious number (A000069) and for the nondeficient numbers a(n) is an evil number (A001969).

Crossrefs

Cf. A000396 (gives the positions of zeros).

Programs

Formula

If A033879(n) <= 0, a(n) = A048724(-A033879(n)), otherwise a(n) = A065621(A033879(n)).
For all n >= 1, A065620(a(n)) = A033879(n).

A331181 Number of values of k, 1 <= k <= n, with A033879(k) = A033879(n), where A033879(n) is the deficiency of n, 2n-sigma(n).

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 1, 4, 1, 2, 1, 1, 1, 2, 2, 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 2, 1, 2, 1, 6, 2, 2, 2, 1, 1, 2, 3, 1, 1, 3, 1, 3, 2, 1, 1, 1, 1, 1, 2, 3, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 4, 7, 2, 5, 1, 4, 2, 2, 1, 1, 1, 2, 2, 3, 2, 6, 1, 1, 2, 2, 1, 1, 1, 2, 1, 3, 1, 1, 2, 3, 3, 1, 3, 1, 1, 1, 3, 1, 1, 7, 1, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Jan 11 2020

Keywords

Comments

Ordinal transform of A033879, or equally, of A033880, or of A286449.

Crossrefs

Programs

  • Mathematica
    b[_] = 0;
    a[n_] := With[{t = 2 n - DivisorSigma[1, n]}, b[t] = b[t] + 1];
    Array[a, 105] (* Jean-François Alcover, Jan 10 2022 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A033879(n) = (2*n-sigma(n));
    v331181 = ordinal_transform(vector(up_to,n,A033879(n)));
    A331181(n) = v331181[n];
Showing 1-10 of 14 results. Next