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

A324874 a(n) is the binary length of A324398(n), where A324398(n) = A156552(n) AND (A323243(n) - A156552(n)).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 3, 0, 0, 1, 0, 1, 4, 4, 0, 1, 0, 1, 5, 1, 0, 1, 0, 1, 4, 1, 0, 1, 0, 1, 0, 1, 5, 4, 0, 1, 7, 1, 0, 1, 0, 1, 3, 1, 0, 1, 0, 0, 2, 1, 0, 1, 6, 1, 9, 1, 0, 1, 0, 1, 3, 6, 0, 1, 0, 1, 0, 1, 0, 5, 0, 1, 5, 1, 6, 1, 0, 1, 4, 1, 0, 1, 8, 1, 11, 1, 0, 6, 7, 1, 0, 1, 9, 5, 0, 0, 7, 5, 0, 1, 0, 1, 6
Offset: 1

Views

Author

Antti Karttunen, Mar 27 2019

Keywords

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A324398(n) = { my(k=A156552(n)); bitand(k,(A323243(n)-k)); }; \\ Needs also code from A323243.
    A324874(n) = #binary(A324398(n));

Formula

If A324398(n) = 0, a(n) = 0, otherwise a(n) = A070939(A324398(n)) = 1 + A000523(A324398(n)).
a(n) = A324868(n) + A324881(n).
a(p) = 0 for all primes p.

A324868 Binary weight of A324398(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 2, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 0, 1, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 1, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 2, 2, 1, 0, 1, 1, 3, 0, 0, 2, 2, 0, 1, 0, 1, 2
Offset: 1

Views

Author

Antti Karttunen, Mar 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A324398(n) = { my(k=A156552(n)); bitand(k,(A323243(n)-k)); }; \\ Needs also code from A323243.
    A324868(n) = hammingweight(A324398(n));

Formula

a(n) = A000120(A324398(n)).

A324878 Xor-Moebius transform of A324398, where A324398(n) = A156552(n) AND (A323243(n) - A156552(n)).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 0, 6, 0, 0, 1, 0, 1, 8, 8, 0, 6, 0, 0, 16, 1, 0, 0, 0, 1, 12, 1, 0, 8, 0, 8, 0, 1, 20, 8, 0, 1, 66, 0, 0, 17, 0, 1, 8, 1, 0, 8, 0, 0, 2, 1, 0, 12, 36, 0, 258, 1, 0, 0, 0, 1, 16, 40, 0, 1, 0, 1, 0, 20, 0, 24, 0, 1, 24, 1, 32, 67, 0, 8, 0, 1, 0, 1, 132, 1, 1026, 0, 0, 40, 72, 1, 0, 1, 256, 16, 0, 1, 68, 16, 0, 3, 0, 0, 46
Offset: 1

Views

Author

Antti Karttunen, Mar 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A318458(n) = bitand(n, sigma(n)-n);
    A324398(n) = if(1==n,0,A318458(A156552(n)));
    \\ Or, equivalently:
    A324398(n) = { my(k=A156552(n)); bitand(k,(A323243(n)-k)); }; \\ Needs also code from A323243.
    A324878(n) = { my(v=0); fordiv(n, d, if(issquarefree(n/d), v=bitxor(v, A324398(d)))); (v); };

Formula

a(p) = 0 for all primes p.

A324881 Number of nonleading zeros in binary representation of A324398, where A324398(n) = A156552(n) AND (A323243(n) - A156552(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 7, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 4, 0, 5, 0, 0, 0, 2, 0, 0, 0, 6, 0, 9, 0, 0, 4, 5, 0, 0, 0, 8, 2, 0, 0, 5, 3, 0, 0, 0, 0, 4
Offset: 1

Views

Author

Antti Karttunen, Mar 27 2019

Keywords

Examples

			For n=4, A324398(4) = 1, in binary "1", thus a(4) = 0.
For n=9, A324398(9) = 6, in binary "110", thus a(9) = 1.
For n=16, A324398(16) = 9, in binary "1001", thus a(16) = 2.
		

Crossrefs

Programs

Formula

a(n) = A080791(A324398(n)) = A324874(n) - A324868(n).
a(p) = 0 for all primes p.

A156552 Unary-encoded compressed factorization of natural numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 7, 6, 9, 16, 11, 32, 17, 10, 15, 64, 13, 128, 19, 18, 33, 256, 23, 12, 65, 14, 35, 512, 21, 1024, 31, 34, 129, 20, 27, 2048, 257, 66, 39, 4096, 37, 8192, 67, 22, 513, 16384, 47, 24, 25, 130, 131, 32768, 29, 36, 71, 258, 1025, 65536, 43, 131072, 2049, 38, 63, 68, 69, 262144
Offset: 1

Views

Author

Leonid Broukhis, Feb 09 2009

Keywords

Comments

The primes become the powers of 2 (2 -> 1, 3 -> 2, 5 -> 4, 7 -> 8); the composite numbers are formed by taking the values for the factors in the increasing order, multiplying them by the consecutive powers of 2, and summing. See the Example section.
From Antti Karttunen, Jun 27 2014: (Start)
The odd bisection (containing even terms) halved gives A244153.
The even bisection (containing odd terms), when one is subtracted from each and halved, gives this sequence back.
(End)
Question: Are there any other solutions that would satisfy the recurrence r(1) = 0; and for n > 1, r(n) = Sum_{d|n, d>1} 2^A033265(r(d)), apart from simple variants 2^k * A156552(n)? See also A297112, A297113. - Antti Karttunen, Dec 30 2017

Examples

			For 84 = 2*2*3*7 -> 1*1 + 1*2 + 2*4 + 8*8 =  75.
For 105 = 3*5*7 -> 2*1 + 4*2 + 8*4 = 42.
For 137 = p_33 -> 2^32 = 4294967296.
For 420 = 2*2*3*5*7 -> 1*1 + 1*2 + 2*4 + 4*8 + 8*16 = 171.
For 147 = 3*7*7 = p_2 * p_4 * p_4 -> 2*1 + 8*2 + 8*4 = 50.
		

Crossrefs

One less than A005941.
Inverse permutation: A005940 with starting offset 0 instead of 1.
Cf. also A297106, A297112 (Möbius transform), A297113, A153013, A290308, A300827, A323243, A323244, A323247, A324201, A324812 (n for which a(n) is a square), A324813, A324822, A324823, A324398, A324713, A324815, A324819, A324865, A324866, A324867.

Programs

  • Mathematica
    Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[ Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ n]], {n, 67}] (* Michael De Vlieger, Sep 08 2016 *)
  • PARI
    a(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ David A. Corneth, Mar 08 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)))); \\ (based on the given recurrence) - Antti Karttunen, Mar 08 2019
    
  • Perl
    # Program corrected per instructions from Leonid Broukhis. - Antti Karttunen, Jun 26 2014
    # However, it gives correct answers only up to n=136, before corruption by a wrap-around effect.
    # Note that the correct answer for n=137 is A156552(137) = 4294967296.
    $max = $ARGV[0];
    $pow = 0;
    foreach $i (2..$max) {
    @a = split(/ /, `factor $i`);
    shift @a;
    $shift = 0;
    $cur = 0;
    while ($n = int shift @a) {
    $prime{$n} = 1 << $pow++ if !defined($prime{$n});
    $cur |= $prime{$n} << $shift++;
    }
    print "$cur, ";
    }
    print "\n";
    (Scheme, with memoization-macro definec from Antti Karttunen's IntSeq-library, two different implementations)
    (definec (A156552 n) (cond ((= n 1) 0) (else (+ (A000079 (+ -2 (A001222 n) (A061395 n))) (A156552 (A052126 n))))))
    (definec (A156552 n) (cond ((= 1 n) (- n 1)) ((even? n) (+ 1 (* 2 (A156552 (/ n 2))))) (else (* 2 (A156552 (A064989 n))))))
    ;; Antti Karttunen, Jun 26 2014
    
  • Python
    from sympy import primepi, factorint
    def A156552(n): return sum((1<Chai Wah Wu, Mar 10 2023

Formula

From Antti Karttunen, Jun 26 2014: (Start)
a(1) = 0, a(n) = A000079(A001222(n)+A061395(n)-2) + a(A052126(n)).
a(1) = 0, a(2n) = 1+2*a(n), a(2n+1) = 2*a(A064989(2n+1)). [Compare to the entanglement recurrence A243071].
For n >= 0, a(2n+1) = 2*A244153(n+1). [Follows from the latter clause of the above formula.]
a(n) = A005941(n) - 1.
As a composition of related permutations:
a(n) = A003188(A243354(n)).
a(n) = A054429(A243071(n)).
For all n >= 1, A005940(1+a(n)) = n and for all n >= 0, a(A005940(n+1)) = n. [The offset-0 version of A005940 works as an inverse for this permutation.]
This permutations also maps between the partition-lists A112798 and A125106:
A056239(n) = A161511(a(n)). [The sums of parts of each partition (the total sizes).]
A003963(n) = A243499(a(n)). [And also the products of those parts.]
(End)
From Antti Karttunen, Oct 09 2016: (Start)
A161511(a(n)) = A056239(n).
A029837(1+a(n)) = A252464(n). [Binary width of terms.]
A080791(a(n)) = A252735(n). [Number of nonleading 0-bits.]
A000120(a(n)) = A001222(n). [Binary weight.]
For all n >= 2, A001511(a(n)) = A055396(n).
For all n >= 2, A000120(a(n))-1 = A252736(n). [Binary weight minus one.]
A252750(a(n)) = A252748(n).
a(A250246(n)) = A252754(n).
a(A005117(n)) = A277010(n). [Maps squarefree numbers to a permutation of A003714, fibbinary numbers.]
A085357(a(n)) = A008966(n). [Ditto for their characteristic functions.]
For all n >= 0:
a(A276076(n)) = A277012(n).
a(A276086(n)) = A277022(n).
a(A260443(n)) = A277020(n).
(End)
From Antti Karttunen, Dec 30 2017: (Start)
For n > 1, a(n) = Sum_{d|n, d>1} 2^A033265(a(d)). [See comments.]
More linking formulas:
A106737(a(n)) = A000005(n).
A290077(a(n)) = A000010(n).
A069010(a(n)) = A001221(n).
A136277(a(n)) = A181591(n).
A132971(a(n)) = A008683(n).
A106400(a(n)) = A008836(n).
A268411(a(n)) = A092248(n).
A037011(a(n)) = A010052(n) [conjectured, depends on the exact definition of A037011].
A278161(a(n)) = A046951(n).
A001316(a(n)) = A061142(n).
A277561(a(n)) = A034444(n).
A286575(a(n)) = A037445(n).
A246029(a(n)) = A181819(n).
A278159(a(n)) = A124859(n).
A246660(a(n)) = A112624(n).
A246596(a(n)) = A069739(n).
A295896(a(n)) = A053866(n).
A295875(a(n)) = A295297(n).
A284569(a(n)) = A072411(n).
A286574(a(n)) = A064547(n).
A048735(a(n)) = A292380(n).
A292272(a(n)) = A292382(n).
A244154(a(n)) = A048673(n), a(A064216(n)) = A244153(n).
A279344(a(n)) = A279339(n), a(A279338(n)) = A279343(n).
a(A277324(n)) = A277189(n).
A037800(a(n)) = A297155(n).
For n > 1, A033265(a(n)) = 1+A297113(n).
(End)
From Antti Karttunen, Mar 08 2019: (Start)
a(n) = A048675(n) + A323905(n).
a(A324201(n)) = A000396(n), provided there are no odd perfect numbers.
The following sequences are derived from or related to the base-2 expansion of a(n):
A000265(a(n)) = A322993(n).
A002487(a(n)) = A323902(n).
A005187(a(n)) = A323247(n).
A324288(a(n)) = A324116(n).
A323505(a(n)) = A323508(n).
A079559(a(n)) = A323512(n).
A085405(a(n)) = A323239(n).
The following sequences are obtained by applying to a(n) a function that depends on the prime factorization of its argument, which goes "against the grain" because a(n) is the binary code of the factorization of n, which in these cases is then factored again:
A000203(a(n)) = A323243(n).
A033879(a(n)) = A323244(n) = 2*a(n) - A323243(n),
A294898(a(n)) = A323248(n).
A000005(a(n)) = A324105(n).
A000010(a(n)) = A324104(n).
A083254(a(n)) = A324103(n).
A001227(a(n)) = A324117(n).
A000593(a(n)) = A324118(n).
A001221(a(n)) = A324119(n).
A009194(a(n)) = A324396(n).
A318458(a(n)) = A324398(n).
A192895(a(n)) = A324100(n).
A106315(a(n)) = A324051(n).
A010052(a(n)) = A324822(n).
A053866(a(n)) = A324823(n).
A001065(a(n)) = A324865(n) = A323243(n) - a(n),
A318456(a(n)) = A324866(n) = A324865(n) OR a(n),
A318457(a(n)) = A324867(n) = A324865(n) XOR a(n),
A318458(a(n)) = A324398(n) = A324865(n) AND a(n),
A318466(a(n)) = A324819(n) = A323243(n) OR 2*a(n),
A318467(a(n)) = A324713(n) = A323243(n) XOR 2*a(n),
A318468(a(n)) = A324815(n) = A323243(n) AND 2*a(n).
(End)

Extensions

More terms from Antti Karttunen, Jun 28 2014

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)

A324866 a(n) = A156552(n) OR A324865(n), where OR is bitwise-OR, A003986.

Original entry on oeis.org

0, 1, 3, 3, 7, 5, 15, 7, 6, 13, 31, 11, 63, 17, 10, 15, 127, 13, 255, 19, 23, 47, 511, 23, 28, 83, 14, 47, 1023, 31, 2047, 31, 54, 175, 22, 31, 4095, 257, 78, 55, 8191, 37, 16383, 67, 30, 799, 32767, 47, 60, 31, 250, 131, 65535, 29, 55, 71, 270, 1301, 131071, 43, 262143, 2735, 54, 63, 126, 95, 524287, 303, 774, 41, 1048575, 55
Offset: 1

Views

Author

Antti Karttunen, Mar 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A318456(n) = bitor(n,sigma(n)-n);
    A324866(n) = if(1==n,0,A318456(A156552(n)));
    
  • PARI
    A324866(n) = { my(k=A156552(n)); bitor(k,(A323243(n)-k)); }; \\ Needs also code from A323243.

Formula

a(1) = 0; for n > 1, a(n) = A318456(A156552(n)).
a(n) = A156552(n) OR (A323243(n) - A156552(n)).

A324396 a(1) = 0; for n > 1, a(n) = A009194(A156552(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 3, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 6, 1, 1, 1, 1, 1, 2, 1, 1, 1, 12, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 3, 2, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 10, 1, 1, 1, 6, 1, 1, 1, 12, 5, 6, 15, 1, 3, 3, 1, 2, 3, 4, 5, 1, 1, 2, 3, 1, 3, 1, 1, 6
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Crossrefs

Programs

Formula

a(1) = 0; for n > 1, a(n) = A009194(A156552(n)).
a(n) = gcd(A156552(n), A323243(n)).

A324867 a(n) = A156552(n) XOR A324865(n), where XOR is bitwise-xor, A003987.

Original entry on oeis.org

0, 1, 3, 2, 7, 4, 15, 6, 0, 13, 31, 10, 63, 16, 2, 6, 127, 12, 255, 18, 7, 46, 511, 22, 28, 82, 4, 46, 1023, 30, 2047, 30, 54, 174, 2, 22, 4095, 256, 12, 54, 8191, 36, 16383, 66, 24, 798, 32767, 46, 60, 31, 248, 130, 65535, 28, 19, 70, 12, 1300, 131071, 42, 262143, 2734, 48, 22, 126, 94, 524287, 302, 774, 40, 1048575, 38, 2097151, 4354, 10
Offset: 1

Views

Author

Antti Karttunen, Mar 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A318457(n) = bitxor(n,sigma(n)-n);
    A324867(n) = if(1==n,0,A318457(A156552(n)));
    
  • PARI
    A324867(n) = { my(k=A156552(n)); bitxor(k,(A323243(n)-k)); }; \\ Needs also code from A323243.

Formula

a(1) = 0; for n > 1, a(n) = A318457(A156552(n)).
a(n) = A156552(n) XOR (A323243(n) - A156552(n)).
a(n) = A323243(n) - 2*A324398(n).

A324397 a(1) = 0; for n > 1, a(n) = A297114(A156552(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 3, -2, 3, 0, 7, 0, 14, -2, 0, 0, 9, 0, 15, -6, 9, 0, 18, -4, 33, -2, 14, 0, 4, 0, 25, -2, 42, -4, 7, 0, 254, -26, 9, 0, 33, 0, 63, -2, 140, 0, 41, -8, 14, -34, 127, 0, 24, -12, 66, -90, 579, 0, 38, 0, 684, -2, 6, -4, 21, 0, 175, -2, 37, 0, 24, 0, 3587, -2, 304, -8, 85, 0, 73, -14, 2733, 0, 6, -52, 8707, -378, 11, 0, 3
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Array[If[# == 1, 0, Function[n, DivisorSum[n, MoebiusMu[n/#] (2 # - DigitCount[2 #, 2, 1] - DivisorSigma[1, #]) &]]@ Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]]] &, 90] (* Michael De Vlieger, Mar 11 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))));
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    \\ Slow: A297114(n) = sumdiv(n,d,moebius(n/d)*(A005187(d)-sigma(d)));
    A297111(n) = sumdiv(n,d,moebius(n/d)*A005187(d));
    A297114(n) = (A297111(n) - n);
    A324397(n) = if(1==n,0,A297114(A156552(n)));

Formula

a(1) = 0; for n > 1, a(n) = A297114(A156552(n)).
For all n >= 1, a(2n-1) = A324103(2n-1).
Showing 1-10 of 11 results. Next