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

A323244 a(1) = 0; and for n > 1, a(n) = A033879(A156552(n)).

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 6, 0, 5, 1, 10, 1, 16, 2, 6, 1, 12, 1, 18, -3, 18, 1, 22, -4, 46, 4, 22, 1, 10, 1, 30, 14, 82, -2, 14, 1, 256, -12, 22, 1, 36, 1, 66, 8, 226, 1, 46, -12, 19, 8, 130, 1, 28, -19, 70, -12, 748, 1, 42, 1, 1362, 16, 22, 10, 42, 1, 214, 254, 40, 1, 38, 1, 3838, 10, 406, -10, 106, 1, 78, -12, 5458, 1, 26, -72, 12250, -348, 30, 1, 12
Offset: 1

Views

Author

Antti Karttunen, Jan 10 2019

Keywords

Comments

After a(1) = 0, the other zeros occur for k >= 1, at A005940(1+A000396(k)), which, provided no odd perfect numbers exist, is equal to A324201(k) = A062457(A000043(k)): 9, 125, 161051, 410338673, ..., etc.
There are 2321 negative terms among the first 10000 terms.

Crossrefs

Cf. A324201 (positions of zeros, conjectured), A324551 (of negative terms), A324720 (of nonnegative terms), A324721 (of positive terms), A324731, A324732.
Cf. A329644 (Möbius transform).
Cf. A323174, A324055, A324185, A324546 for other permutations of deficiency, and also A324574, A324575, A324654.

Programs

  • Mathematica
    Array[2 # - If[# == 0, 0, DivisorSigma[1, #]] &@ Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]] &, 90] (* Michael De Vlieger, Apr 21 2019 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
    A323244(n) = if(1==n, 0, my(k=A156552(n)); (2*k)-sigma(k));
    
  • Python
    from sympy import divisor_sigma, primepi, factorint
    def A323244(n): return (lambda n: (n<<1)-divisor_sigma(n))(sum((1< 1 else 0 # Chai Wah Wu, Mar 10 2023

Formula

a(n) = 2*A156552(n) - A323243(n).
a(1) = 0; and for n > 1, a(n) = A033879(A156552(n)).
a(n) = A323248(n) + A001222(n) = (A323247(n) - A323243(n)) + A001222(n).
From Antti Karttunen, Mar 12 2019 & Nov 23 2019: (Start)
a(n) = Sum_{d|n} (2*A297112(d) - A324543(d)) = Sum_{d|n} A329644(d).
A002487(a(n)) = A324115(n).
a(n) = A329638(n) - A329639(n).
a(n) = A329645(n) - A329646(n).
(End)

A294898 Deficiency minus binary weight: a(n) = A033879(n) - A000120(n) = A005187(n) - A000203(n).

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, 0, 7, -6, 9, 1, 2, 0, 14, -5, 15, -4, 7, 5, 18, -14, 16, 7, 10, -3, 24, -16, 25, 0, 16, 12, 19, -21, 33, 13, 18, -12, 37, -15, 38, 1, 8, 16, 41, -30, 38, 4, 26, 3, 48, -16, 33, -11, 30, 22, 53, -52, 55, 23, 16, 0, 44, -14, 63, 8, 39, -7, 66, -53, 69, 31, 22, 9, 54, -16, 73, -28, 38, 35, 78, -59, 58
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2017

Keywords

Comments

"Least deficient numbers" or "almost perfect numbers" are those k for which A033879(k) = 1, or equally, for which a(k) = -A048881(k-1). The only known solutions are powers of 2 (A000079), all present also in A295296. See also A235796 and A378988. - Antti Karttunen, Dec 16 2024

Crossrefs

Cf. A000120, A000203, A001065, A005187, A011371, A013661, A033879, A048881, A235796, A294896, A294899, A297114 (Möbius transform), A317844 (difference from a(n)), A326133, A326138, A324348 (a(n) applied to Doudna sequence), A379008 (a(n) applied to prime shift array), A378988.
Cf. A295296 (positions of zeros), A295297 (parity of a(n)).

Programs

Formula

a(n) = A005187(n) - A000203(n).
a(n) = A011371(n) - A001065(n).
a(n) = A033879(n) - A000120(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - zeta(2)/2 = 0.177532... . - Amiram Eldar, Feb 22 2024

Extensions

Name edited by Antti Karttunen, Dec 16 2024

A323910 Dirichlet inverse of the deficiency of n, A033879.

Original entry on oeis.org

1, -1, -2, 0, -4, 4, -6, 0, -1, 6, -10, 2, -12, 8, 10, 0, -16, 1, -18, 2, 14, 12, -22, 4, -3, 14, -2, 2, -28, -16, -30, 0, 22, 18, 26, 4, -36, 20, 26, 4, -40, -24, -42, 2, 4, 24, -46, 8, -5, -1, 34, 2, -52, 0, 42, 4, 38, 30, -58, 2, -60, 32, 6, 0, 50, -40, -66, 2, 46, -40, -70, 12, -72, 38, 2, 2, 62, -48, -78, 8, -4, 42, -82, -2, 66, 44, 58, 4, -88, 2, 74, 2
Offset: 1

Views

Author

Antti Karttunen, Feb 12 2019

Keywords

Crossrefs

Cf. A033879, A323911, A323912, A359549 (parity of terms).
Sequences that appear in the convolution formulas: A002033, A008683, A023900, A055615, A046692, A067824, A074206, A174725, A191161, A327960, A328722, A330575, A345182, A349341, A346246, A349387.

Programs

  • Mathematica
    b[n_] := 2 n - DivisorSigma[1, n];
    a[n_] := a[n] = If[n == 1, 1, -Sum[b[n/d] a[d], {d, Most@ Divisors[n]}]];
    Array[a, 100] (* Jean-François Alcover, Feb 17 2020 *)
  • PARI
    up_to = 16384;
    DirInverse(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = -sumdiv(n, d, if(dA033879(n) = (2*n-sigma(n));
    v323910 = DirInverse(vector(up_to,n,A033879(n)));
    A323910(n) = v323910[n];

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA033879(n/d) * a(d).
From Antti Karttunen, Nov 14 2024: (Start)
Following convolution formulas have been conjectured for this sequence by Sequence Machine, with each one giving the first 10000 terms correctly:
a(n) = Sum_{d|n} A046692(d)*A067824(n/d).
a(n) = Sum_{d|n} A055615(d)*A074206(n/d).
a(n) = Sum_{d|n} A023900(d)*A174725(n/d).
a(n) = Sum_{d|n} A008683(d)*A323912(n/d).
a(n) = Sum_{d|n} A191161(d)*A327960(n/d).
a(n) = Sum_{d|n} A328722(d)*A330575(n/d).
a(n) = Sum_{d|n} A345182(d)*A349341(n/d).
a(n) = Sum_{d|n} A346246(d)*A349387(n/d).
a(n) = Sum_{d|n} A002033(d-1)*A055615(n/d).
(End)

A324055 Deficiency of Doudna-sequence: a(n) = A033879(A005940(1+n)).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 5, 1, 6, 2, 6, -4, 19, -3, 14, 1, 10, 4, 10, -2, 22, -12, 12, -12, 41, 7, 26, -19, 94, -12, 41, 1, 12, 8, 18, 0, 38, -12, 22, -10, 58, -4, 18, -48, 102, -54, 30, -28, 109, 25, 66, -17, 148, -72, 47, -51, 286, 32, 126, -64, 469, -39, 122, 1, 16, 10, 22, 4, 46, -12, 42, -8, 70, 4, 42, -56, 178, -60, 58, -26, 118, 20
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2019

Keywords

Comments

Both here and in the mirror image sequence A324185, the lowermost (asinh) scatter plot shows on the y = 0 line the numbers that correspond to the perfect numbers. Compare also to the scatter plot of A243492.

Crossrefs

See A106737, A290077, A323915, A324052, A324054, A324056, A324057, A324058, A324114, A324335, A324340, A324348, A324349, A324394, A324395 for other sequences as permuted by A005940, and compare their scatter plots.

Programs

  • Mathematica
    Array[Block[{p = Partition[Split[Join[IntegerDigits[#, 2], {2}]], 2]}, 2 # - DivisorSigma[1, #] &[Times @@ Flatten@ Table[Prime[Count[Flatten@ #, 0] + 1]^#[[1, 1]] &@ Take[p, -i], {i, Length[p]}]]] &, 82, 0] (* Michael De Vlieger, Mar 11 2019, after Robert G. Wilson v at A005940 *)
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A033879(n) = (2*n-sigma(n));
    A324055(n) = A033879(A005940(1+n));
    
  • PARI
    A324055(n) = { my(m1=2,m2=1,p=2,mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4),mp *= p,m2 *= (mp-1)/(p-1))); n>>=1); (m1-m2); };

Formula

a(n) = A033879(A005940(1+n)).
a(n) = 2*A005940(1+n) - A324054(n).
For n > 0, a(n) = A324185(A054429(n)).
a(n) = A324348(n) + A000120(A005940(1+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");

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

A323174 Deficiency computed for conjugated prime factorization: a(n) = A033879(A122111(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 0, 1, 4, 5, -4, 1, 2, 1, -12, -3, 6, 1, 6, 1, -2, -19, -28, 1, 4, 14, -60, 19, -10, 1, -12, 1, 10, -51, -124, -12, 10, 1, -252, -115, 0, 1, -48, 1, -26, 7, -508, 1, 8, 41, 12, -243, -58, 1, 22, -64, -8, -499, -1020, 1, -12, 1, -2044, -17, 12, -168, -120, 1, -122, -1011, -54, 1, 18, 1, -4092, 26, -250, -39, -264, 1, 4
Offset: 1

Views

Author

Antti Karttunen, Jan 10 2019

Keywords

Comments

Zeros occur at A122111(A000396(k)), k >= 1: 6, 40, 11264, 18253611008, ...

Crossrefs

Programs

  • Mathematica
    A122111[n_] := Product[Prime[Sum[If[jA122111[n]}, 2k - DivisorSigma[1, k]];
    Array[a, 80] (* Jean-François Alcover, Sep 23 2020 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
    A323174(n) = { my(k=A122111(n)); ((2*k)-sigma(k)); }

Formula

a(n) = A033879(A122111(n)).
a(n) = 2*A122111(n) - A323173(n).

A324185 Deficiency of n permuted by A163511: a(n) = A033879(A163511(n)) = 2*A163511(n) - sigma(A163511(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 5, 0, 4, 1, 14, -3, 19, -4, 6, 2, 6, 1, 41, -12, 94, -19, 26, 7, 41, -12, 12, -12, 22, -2, 10, 4, 10, 1, 122, -39, 469, -64, 126, 32, 286, -51, 47, -72, 148, -17, 66, 25, 109, -28, 30, -54, 102, -48, 18, -4, 58, -10, 22, -12, 38, 0, 18, 8, 12, 1, 365, -120, 2344, -199, 626, 157, 2001, -168, 222, -372, 1030, -92, 458, 172, 1198
Offset: 0

Views

Author

Antti Karttunen, Feb 17 2019

Keywords

Comments

If there are no odd perfect numbers, then all n for which a(n) is 0 are given by sequence A324200.

Crossrefs

Programs

  • PARI
    A163511(n) = if(!n,1,my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A033879(n) = (2*n-sigma(n));
    A324185(n) = A033879(A163511(n));
    
  • PARI
    A324184(n) = if(!n,1,my(p=2,mp=p*p,m=1); while(n>1, if(n%2, p=nextprime(1+p); mp = p*p, if((2==n)||!(n%4),mp *= p,m *= (mp-1)/(p-1))); n >>= 1); (m*(mp-1)/(p-1)));
    A324185(n) = (2*A163511(n)) - A324184(n);

Formula

a(n) = A033879(A163511(n)) = 2*A163511(n) - A324184(n) = 2*A163511(n) - A000203(A163511(n)).
For n > 0, a(n) = A324055(A054429(n)).

A325379 a(n) = A033879(A228058(n)).

Original entry on oeis.org

12, 52, 72, 148, 132, 216, 172, 192, 84, 292, 252, 292, 412, 476, 352, 520, 432, 640, 592, 472, 492, 672, 532, 552, 748, 412, 672, 976, 732, 576, 772, 1132, 1048, 1128, 852, 1284, 892, 952, 972, 1324, 1460, 1356, 1624, 1720, 1132, 1152, 1192, -36, 1660, 1272, 1068, 1332, 1812, 1372, 1888, 1392, 2116, 1452, 1972, 2040, 1552, 2116
Offset: 1

Views

Author

Antti Karttunen, Apr 22 2019

Keywords

Comments

The negative terms -36, -1692, -2388, -34944, -16596, -38628, -512, ..., occur at n = 48, 378, 1744, 2255, 2745, 2870, 3555, ..., where A228058(n) is 2205, 19845, 108045, 143325, 178605, 187425, 236925, ..., one of the odd abundant numbers, A005231.

Crossrefs

Programs

  • PARI
    A033879(n) = (n+n-sigma(n));
    isA228058(n) = if(!(n%2)||(omega(n)<2),0,my(f=factor(n),y=0); for(i=1,#f~,if(1==(f[i,2]%4), if((1==y)||(1!=(f[i,1]%4)),return(0),y=1), if(f[i,2]%2, return(0)))); (y));
    k=0; n=0; while(k<100,n++; if(isA228058(n), k++; print1(A033879(n), ", ")));

Formula

a(n) = A033879(A228058(n)).
a(n) = A325319(n) - A325320(n).
A001511(abs(a(n))) = A325310(A228058(n)), assuming there are no odd perfect numbers, in which case A001511(abs(a(n))) >= 3 for all n. That is, all terms are multiples of 4.

A324546 An analog of deficiency (A033879) for nonstandard factorization based on the sieve of Eratosthenes (A083221).

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, 14, 8, 22, -12, 19, 10, 10, 0, 28, -12, 30, 1, 12, 14, 22, -19, 36, 16, 18, -10, 40, -12, 42, 4, 41, 20, 46, -28, 41, 7, 26, 6, 52, -12, 94, -8, 22, 26, 58, -48, 60, 28, 22, 1, 38, -54, 66, 10, 30, -4, 70, -51, 72, 34, 30, 12, 58, -12, 78, -26, 42, 38, 82, -64, 102, 40, 18, -4, 88
Offset: 1

Views

Author

Antti Karttunen, Mar 06 2019

Keywords

Comments

Even positions for zeros is given by the even terms of A000396, because they are among the fixed points of permutation A250246. Whether there are any zeros in odd positions depends on whether there are any odd perfect numbers. If such zeros exist, they would not necessarily be in the same positions as in A033879.

Crossrefs

Programs

  • PARI
    up_to = 65539;
    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; };
    A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
    A055396(n) = if(1==n,0,primepi(A020639(n)));
    v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
    A078898(n) = v078898[n];
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A250246(n) = if(1==n,n,my(k = 2*A250246(A078898(n)), r = A055396(n)); if(1==r, k, while(r>1, k = A003961(k); r--); (k)));
    A324546(n) = { my(k=A250246(n)); (k+k - sigma(k)); };

Formula

a(n) = A033879(A250246(n)) = 2*A250246(n) - A324545(n).
a(n) = A250246(n) - A324535(n).
Showing 1-10 of 185 results. Next