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

A103969 Positions n such that A005941(n) = A005940(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 80, 96, 112, 128, 144, 160, 192, 224, 256, 288, 320, 384, 448, 512, 576, 640, 768, 896, 1024, 1152, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 6144, 7168
Offset: 1

Views

Author

Robert G. Wilson v, Feb 22 2005

Keywords

Comments

Sequence with n>=5 appears to be quintisected with the quintisections multiples of A000079 (powers of two): a(5m) = 5,10,20,40... = 5*2^(m-1) for m>0; a(5m+1) = 6,12,24,48,... = 6*2^(m-1); likewise a(5m+2) = 7*2^(m-1); a(5m+3) = 8*2^(m-1); a(5m+4) = 9*2^(m-1). - Ralf Stephan, Nov 13 2010
From Antti Karttunen, Aug 01 2023: (Start)
Numbers k for which A005940(A005940(k)) = k, or equally, for which A005941(A005941(k)) = k, i.e., numbers that are either fixed points of permutation A005940/A005941, or elements of its 2-cycles.
If n is a term then also 2*n is present, and vice versa.
Question: Are 1, 3, 5, 7 and 9 the only odd terms of this sequence?
(End)

Examples

			56 is in the sequence since A005940(56) = A005941(56) = 72.
7 is in the sequence since A005940(7) = 9, and A005940(9) = 7, thus also A005941(7) = 9, and A005941(9) = 7. - _Antti Karttunen_, Aug 01 2023
		

Crossrefs

Cf. A005940, A005941, A029747 (subsequence).

Programs

  • 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^4}]; u = Flatten[ Table[ Position[t, n, 1, 1], {n, 10^4}]]; Do[ If[ u[[n]] == {}, u[[n]] = {0}], {n, 10^4}]; Flatten[ Position[ Take[t, 10^4] - Flatten[u], 0]]
  • Python
    from math import prod
    from itertools import accumulate, count, islice
    from sympy import prime, primepi, factorint
    from collections import Counter
    def A103969_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:sum((1<A103969_list = list(islice(A103969_gen(),20)) # Chai Wah Wu, Mar 11 2023

Formula

Empirical g.f.: x*(1 +x +x^2 +x^3 +x^4)^2 / (1-2*x^5). - Colin Barker, Nov 18 2016

Extensions

Definition corrected and example updated by R. J. Mathar, Mar 06 2010

A364551 Odd numbers k such that k is a multiple of A005941(k).

Original entry on oeis.org

1, 3, 5, 3125, 7875, 12005, 13365, 22869, 23595, 46475, 703395, 985439, 2084775, 2675673, 13619125, 19144125
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Odd numbers k such that k is a multiple of 1+A156552(k).
Sequence A005940(A364545(n)) sorted into ascending order.
This is a subsequence of A364561, so the comments given in A364564 apply also here (see also the example section).

Examples

			In all these cases, the right hand side is a divisor of the left hand side:
      Term   (and its factorization)             A005941(term)
         1   (unity)                         ->    1
         3   (prime)                         ->    3
         5   (prime)                         ->    5
      3125 = 5^5                             ->    125 = 5^3
      7875 = 3^2 * 5^3 * 7                   ->    375 = 3 * 5^3
     12005 = 5 * 7^4                         ->    245 = 5 * 7^2
     13365 = 3^5 * 5 * 11                    ->    1215 = 3^5 * 5
     22869 = 3^3 * 7 * 11^2                  ->    847 = 7 * 11^2
     23595 = 3 * 5 * 11^2 * 13               ->    715 = 5 * 11 * 13
     46475 = 5^2 * 11 * 13^2                 ->    845 = 5 * 13^2
    703395 = 3^2 * 5 * 7^2 * 11 * 29         ->    33495 = 3 * 5 * 7 * 11 * 29
    985439 = 7^3 * 13^2 * 17                 ->    2873 = 13^2 * 17
   2084775 = 3 * 5^2 * 7 * 11 * 19^2         ->    12635 = 5 * 7 * 19^2
   2675673 = 3^5 * 7 * 11^2 * 13             ->    11583 = 3^4 * 11 * 13
  13619125 = 5^3 * 13 * 17^2 * 29            ->    36125 = 5^3 * 17^2
  19144125 = 3^2 * 5^3 * 7 * 11 * 13 * 17    ->    21879 = 3^2 * 11 * 13 * 17.
		

Crossrefs

Subsequence of A364561, which is a subsequence of A364560.

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)
    isA364551(n) = ((n%2)&&!(n%A005941(n)));

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

A246368 Permutation of natural numbers: a(n) = A227413(A005941(n)).

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 8, 5, 9, 13, 10, 17, 20, 19, 12, 11, 46, 23, 166, 41, 15, 29, 858, 59, 14, 71, 16, 67, 6186, 37, 58645, 31, 18, 199, 22, 83, 705348, 983, 32, 179, 10428487, 47, 184718194, 109, 21, 6659, 3840230006, 277, 27, 43, 65, 353
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2014

Keywords

Crossrefs

Inverse: A246367.
Similar or related permutations: A005941, A156552, A227413, A246364, A246366.

Programs

Formula

a(n) = A227413(A005941(n)) = A227413(1+A156552(n)).
Other identities:
For all n >= 1, A010051(a(n)) = 1 - A000035(n). [This permutation maps even numbers to primes and odd numbers to nonprimes, in some order, because the permutation A227413 has the same property and A005941 preserves the parity].

A364558 a(n) = A364557(n) - A000010(n), where A364557 is the Möbius transform of A005941, and A000010 (Euler phi) is the Möbius transform of A000027.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 6, 0, 20, 2, -4, 0, 48, -2, 110, 0, -4, 6, 234, 0, -12, 20, -10, 4, 484, -4, 994, 0, -4, 48, -16, -4, 2012, 110, 8, 0, 4056, -4, 8150, 12, -16, 234, 16338, 0, -26, -12, 32, 40, 32716, -10, -24, 8, 92, 484, 65478, -8, 131012, 994, -20, 0, -16, -4, 262078, 96, 212, -16, 524218, -8, 1048504
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Crossrefs

Cf. A000010, A005941, A364557, A364559 (inverse Möbius transform), A364565 (positions of 0's), A364566 (of terms < 0).

Programs

  • PARI
    A364558(n) = (A364557(n)-eulerphi(n));
    
  • Python
    from math import prod
    from sympy import factorint, primepi
    def A364558(n): return (1<1 else 0 # Chai Wah Wu, Jul 29 2023

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

A246366 Permutation of natural numbers: a(n) = A005941(A227413(n)).

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 7, 5, 8, 33, 12, 65, 18, 257, 16, 17, 10, 129, 11, 4097, 34, 2049, 19, 65537, 15, 8193, 24, 4194305, 21, 32769, 66, 1025, 20, 513, 14, 262145, 22, 16385, 13, 1099511627777, 1026, 2097153, 130, 68719476737, 30, 1048577, 35, 288230376151711745, 8194, 67108865, 40, 4398046511105, 2050, 8388609, 28
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2014

Keywords

Comments

Maps even numbers to terms of A000051 (2^n + 1) in some order.

Crossrefs

Inverse: A246365.
Related or similar permutations: A005941, A156552, A227413, A246364, A246368.
Cf. A000051.

Programs

Formula

a(n) = A005941(A227413(n)) = 1 + A156552(A227413(n)).

A364548 Numbers k such that k divides A005941(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96, 97, 128, 160, 192, 194, 256, 320, 345, 384, 388, 512, 549, 640, 690, 768, 776, 1024, 1093, 1098, 1280, 1380, 1536, 1552, 2048, 2186, 2196, 2560, 2760, 3072, 3104, 4096, 4372, 4392, 5120, 5520, 6144, 6208, 8192, 8744, 8784, 10240, 11040, 12288, 12416, 16384
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Numbers k such that k divides 1+A156552(k).
Sequence A005940(A364546(.)) sorted into ascending order.
If k is a term, then also 2*k is present in this sequence, and vice versa.

Crossrefs

Subsequences: A029747, A364549 (odd terms).
Cf. also A364497.

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)
    isA364548(n) = !(A005941(n)%n);

A364549 Odd numbers k that divide A005941(k).

Original entry on oeis.org

1, 3, 5, 97, 345, 549, 1093, 64621, 671515, 3280317, 8957089
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Sequence A005940(A364547(.)) sorted into ascending order.
Odd numbers k such that k divides 1+A156552(k).
The first ten terms factored:
1 (unity)
3 (prime)
5 (prime)
97 (prime)
345 = 3*5*23
549 = 3^2 * 61
1093 (prime)
64621 (prime)
671515 = 5*13*10331
3280317 = 3*79*13841.
Primes p present are those that occur as factors of 1 + 2^(A000720(p)-1).

Crossrefs

Odd terms in A364548.
Cf. also A364498, A364547, A364551.

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)
    isA364549(n) = ((n%2)&&!(A005941(n)%n));
    
  • Python
    from itertools import count, islice
    from sympy import primepi, factorint
    def A364549_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue+(startvalue&1^1),1),2):
            if not (sum(pow(2,i+int(primepi(p))-1,n) for i, p in enumerate(factorint(n, multiple=True)))+1) % n:
                yield n
    A364549_list = list(islice(A364549_gen(),8)) # Chai Wah Wu, Jul 28 2023

Extensions

a(11) from Chai Wah Wu, Jul 28 2023

A364550 Numbers k such that k is a multiple of A005941(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96, 128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3125, 4096, 5120, 6144, 6250, 7875, 8192, 10240, 12005, 12288, 12500, 13365, 15750, 16384, 20480, 22869, 23595, 24010, 24576, 25000, 26730, 31500, 32768, 40960, 45738, 46475
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Numbers k such that k is a multiple of 1+A156552(k).
If k is a term, then also 2*k is present in this sequence, and vice versa.

Crossrefs

Subsequence of A364560.
Subsequences: A029747, A364551 (odd terms).
Cf. also

Programs

Showing 1-10 of 33 results. Next