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

A005941 Inverse of the Doudna sequence A005940.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 17, 12, 33, 18, 11, 16, 65, 14, 129, 20, 19, 34, 257, 24, 13, 66, 15, 36, 513, 22, 1025, 32, 35, 130, 21, 28, 2049, 258, 67, 40, 4097, 38, 8193, 68, 23, 514, 16385, 48, 25, 26, 131, 132, 32769, 30, 37, 72, 259, 1026, 65537, 44, 131073, 2050, 39, 64
Offset: 1

Views

Author

Keywords

Comments

a(2^k) = 2^k. - Robert G. Wilson v, Feb 22 2005
Fixed points: A029747. - Reinhard Zumkeller, Aug 23 2006
Question: Is there a simple proof that a(c) = c would never allow an odd composite c as a solution? See also A364551. - Antti Karttunen, Jul 30 2023

References

  • J. H. Conway, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A103969. Inverse of A005940. One more than A156552.
Cf. A364559 [= a(n)-n], A364557 (Möbius transform), A364558.
Cf. A029747 [known positions where a(n) = n], A364560 [where a(n) <= n], A364561 [where a(n) <= n and n is odd], A364562 [where a(n) > n], A364548 [where n divides a(n)], A364549 [where odd n divides a(n)], A364550 [where a(n) divides n], A364551 [where a(n) divides n and n is odd].

Programs

  • Maple
    A005941 := proc(n)
        local k ;
        for k from 1 do
        if A005940(k) = n then # code reuse
            return k;
        end if;
        end do ;
    end proc: # R. J. Mathar, Mar 06 2010
  • Mathematica
    f[n_] := Block[{p = Partition[ Split[ Join[ IntegerDigits[n - 1, 2], {2}]], 2]}, Times @@ Flatten[ Table[q = Take[p, -i]; Prime[ Count[ Flatten[q], 0] + 1]^q[[1, 1]], {i, Length[p]}] ]]; t = Table[ f[n], {n, 10^5}]; Flatten[ Table[ Position[t, n, 1, 1], {n, 64}]] (* Robert G. Wilson v, Feb 22 2005 *)
  • PARI
    A005941(n) = { my(f=factor(n), p, 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]); (1+res) }; \\ (After David A. Corneth's program for A156552) - Antti Karttunen, Jul 30 2023
  • Python
    from sympy import primepi, factorint
    def A005941(n): return sum((1<Chai Wah Wu, Mar 11 2023
    
  • Scheme
    (define (A005941 n) (+ 1 (A156552 n))) ;; Antti Karttunen, Jun 26 2014
    

Formula

a(n) = h(g(n,1,1), 0) / 2 + 1 with h(n, m) = if n=0 then m else h(floor(n/2), 2*m + n mod 2) and g(n, i, x) = if n=1 then x else (if n mod prime(i) = 0 then g(n/prime(i), i, 2*x+1) else g(n, i+1, 2*x)). - Reinhard Zumkeller, Aug 23 2006
a(n) = 1 + A156552(n). - Antti Karttunen, Jun 26 2014

Extensions

More terms from Robert G. Wilson v, Feb 22 2005
a(61) inserted by R. J. Mathar, Mar 06 2010

A364557 Möbius transform of A005941.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 8, 4, 4, 4, 16, 4, 32, 8, 4, 8, 64, 4, 128, 8, 8, 16, 256, 8, 8, 32, 8, 16, 512, 4, 1024, 16, 16, 64, 8, 8, 2048, 128, 32, 16, 4096, 8, 8192, 32, 8, 256, 16384, 16, 16, 8, 64, 64, 32768, 8, 16, 32, 128, 512, 65536, 8, 131072, 1024, 16, 32, 32, 16, 262144, 128, 256, 8, 524288, 16, 1048576, 2048
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Crossrefs

Programs

  • PARI
    A364557(n) = if(1==n, 1, 2^(primepi(vecmax(factor(n)[, 1]))+(bigomega(n)-omega(n))-1));
    
  • PARI
    A005941(n) = { my(f=factor(n), p, 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]); (1+res) }; \\ (After David A. Corneth's program for A156552)
    A364557(n) = sumdiv(n,d,moebius(n/d)*A005941(d));
    
  • Python
    from sympy import factorint, primepi
    def A364557(n): return 1<1 else 1 # Chai Wah Wu, Jul 29 2023

Formula

a(n) = Sum_{d|n} A008683(n/d) * A005941(d).
a(1) = 1; for n > 1, a(n) = A297112(n) = 2^(A297113(n)-1) = 2^A297167(n).

A364559 a(n) = A005941(n) - n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 6, 0, 20, 4, -4, 0, 48, -4, 110, 0, -2, 12, 234, 0, -12, 40, -12, 8, 484, -8, 994, 0, 2, 96, -14, -8, 2012, 220, 28, 0, 4056, -4, 8150, 24, -22, 468, 16338, 0, -24, -24, 80, 80, 32716, -24, -18, 16, 202, 968, 65478, -16, 131012, 1988, -24, 0, 4, 4, 262078, 192, 446, -28, 524218, -16
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Examples

			a(528581) = -4 as A005941(528581) = 528577 = 528581-4. Notably, 528581 = 17^2 * 31 * 59, with divisors [1, 17, 31, 59, 289, 527, 1003, 1829, 8959, 17051, 31093, 528581]. Applying A364557 to these divisors gives [1, 64, 1024, 65536, 128, 1024, 65536, 65536, 2048, 131072, 65536, 131072], while applying Euler totient phi (A000010) to them gives [1, 16, 30, 58, 272, 480, 928, 1740, 8160, 15776, 27840, 473280], their differences being [0, 48, 994, 65478, -144, 544, 64608, 63796, -6112, 115296, 37696, -342208], whose sum is -4.
		

Crossrefs

Cf. A005941, A364499, A364557, A364558 (Möbius transform).
Cf. A029747 (known positions of 0's), A364560 (of terms <= 0), A364562 (of terms > 0), A364576.
Cf. also A364288.

Programs

  • PARI
    A005941(n) = { my(f=factor(n), p, 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]); (1+res) }; \\ (After David A. Corneth's program for A156552)
    A364559(n) = (A005941(n)-n);
    
  • Python
    from sympy import factorint, primepi
    def A364559(n): return sum(1<Chai Wah Wu, Jul 29 2023

Formula

a(n) = -A364499(A005941(n)).
a(n) = Sum_{d|n} A364558(d).

A364565 Numbers k at which point A364557 (the Möbius transform of A005941) is equal to A000010 (Euler phi function).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64, 80, 85, 96, 128, 160, 170, 192, 256, 320, 340, 384, 512, 640, 680, 768, 1024, 1280, 1360, 1536, 2048, 2560, 2720, 3072, 4096, 5120, 5440, 6144, 8192, 10240, 10880, 12288, 16384, 20480, 21760, 24576, 32768, 40960, 43520, 49152, 65536, 81920, 87040, 98304, 131072
Offset: 1

Views

Author

Antti Karttunen, Jul 29 2023

Keywords

Comments

Question: Are there any other odd terms apart from 1, 3, 5, 85?

Crossrefs

Positions of 0's in A364558.

Programs

  • PARI
    A364557(n) = if(1==n, 1, 2^(primepi(vecmax(factor(n)[, 1]))+(bigomega(n)-omega(n))-1));
    isA364565(n) = (A364557(n)==eulerphi(n));

A364568 a(n) = A290077(n) - A364567(n).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 2, 0, -2, 0, 4, 0, 12, 2, 10, 0, -6, -2, 4, 0, 16, 4, 16, 0, 26, 12, 32, 4, 84, 10, 38, 0, -20, -6, 4, -4, 24, 4, 20, 0, 44, 16, 40, 8, 104, 16, 56, 0, 78, 26, 68, 24, 152, 32, 104, 8, 262, 84, 184, 20, 468, 38, 130, 0, -48, -20, -8, -12, 16, 4, 28, -8, 40, 24, 64, 8, 168, 20, 76, 0, 88, 44, 104, 32
Offset: 0

Views

Author

Antti Karttunen, Aug 05 2023

Keywords

Crossrefs

Programs

  • PARI
    A290077(n) = { my(p=2,z=1); while(n, if(!(n%2), p=nextprime(1+p), z *= (p-(1==(n%4)))); n>>=1); (z); };
    A364567(n) = if(!n,n, my(i=1); while(n>1, if((n%4)!=1, i<<=1); n >>= 1); (i));
    A364568(n) = (A290077(n) - A364567(n));

Formula

For n > 0, a(n) = -A364558(A005940(1+n)) = A000010(A005940(1+n)) - 2^A033265(n).

A364566 Numbers k such that A364557(k) < A000010(k), where A364557 is the Möbius transform of A005941, and A000010 is Euler totient function phi.

Original entry on oeis.org

9, 15, 18, 21, 25, 27, 30, 33, 35, 36, 42, 45, 49, 50, 54, 55, 60, 63, 65, 66, 70, 72, 75, 77, 81, 84, 90, 91, 98, 99, 100, 105, 108, 110, 117, 119, 120, 121, 125, 126, 130, 132, 135, 140, 143, 144, 147, 150, 154, 162, 165, 168, 169, 175, 180, 182, 187, 189, 195, 196, 198, 200, 209, 210, 216, 220, 221, 225, 231
Offset: 1

Views

Author

Antti Karttunen, Jul 29 2023

Keywords

Crossrefs

Positions of negative terms in A364558.

Programs

  • PARI
    A364557(n) = if(1==n, 1, 2^(primepi(vecmax(factor(n)[, 1]))+(bigomega(n)-omega(n))-1));
    isA364566(n) = (A364557(n)
    				
Showing 1-6 of 6 results.