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

A029747 Numbers of the form 2^k times 1, 3 or 5.

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, 4096, 5120, 6144, 8192, 10240, 12288, 16384, 20480, 24576, 32768, 40960, 49152, 65536, 81920, 98304, 131072, 163840, 196608
Offset: 1

Views

Author

Keywords

Comments

Fixed points of the Doudna sequence: A005940(a(n)) = A005941(a(n)) = a(n). - Reinhard Zumkeller, Aug 23 2006
Subsequence of A103969. - R. J. Mathar, Mar 06 2010
Question: Is there a simple proof that A005940(c) = c would never allow an odd composite c as a solution? See also my comments in A163511 and in A335431 concerning similar problems, also A364551 and A364576. - Antti Karttunen, Jul 28 & Aug 11 2023

Examples

			128 = 2^7 * 1 is in the sequence as well as 160 = 2^5 * 5. - _David A. Corneth_, Sep 18 2020
		

Crossrefs

Subsequence of the following sequences: A103969, A253789, A364541, A364542, A364544, A364546, A364548, A364550, A364560, A364565.
Even terms form a subsequence of A320674.

Programs

  • Mathematica
    m = 200000; Select[Union @ Flatten @ Outer[Times, {1, 3, 5}, 2^Range[0, Floor[Log2[m]]]], # < m &] (* Amiram Eldar, Oct 15 2020 *)
  • PARI
    is(n) = n>>valuation(n, 2) <= 5 \\ David A. Corneth, Sep 18 2020
    
  • Python
    def A029747(n):
        if n<3: return n
        a, b = divmod(n,3)
        return 1<Chai Wah Wu, Apr 02 2025

Formula

a(n) = if n < 6 then n else 2*a(n-3). - Reinhard Zumkeller, Aug 23 2006
G.f.: (1+x+x^2)^2/(1-2*x^3). - R. J. Mathar, Mar 06 2010
Sum_{n>=1} 1/a(n) = 46/15. - Amiram Eldar, Oct 15 2020

Extensions

Edited by David A. Corneth and Peter Munn, Sep 18 2020

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

A364561 Odd numbers k for which A156552(k) < k.

Original entry on oeis.org

1, 3, 5, 9, 15, 21, 25, 27, 35, 45, 49, 55, 63, 75, 77, 81, 91, 99, 105, 121, 125, 135, 143, 147, 165, 169, 175, 187, 189, 195, 221, 225, 231, 243, 245, 273, 275, 289, 297, 315, 323, 325, 343, 351, 357, 363, 375, 385, 405, 425, 429, 441, 455, 495, 507, 525, 539, 561, 567, 585, 595, 605, 625, 627, 637, 663, 665
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Odd numbers k such that A005941(k) <= k.

Crossrefs

Odd terms in A364560.
Cf. A005940, A005941, A156552, A364545, A364564 (largest prime factor).
Cf. also A364551, A364576 (subsequences).

Programs

  • PARI
    A156552(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]); res };
    isA364561(n) = ((n%2)&&(A156552(n) < n));

A364576 Starting from k=1, each subsequent term is the next larger odd k such that A156552(k) < k and the ratio A156552(k)/k is nearer to 1.0 than for any previous k in the sequence.

Original entry on oeis.org

1, 3, 5, 21, 323, 66297, 139965, 263375, 264845, 528581
Offset: 1

Views

Author

Antti Karttunen, Aug 06 2023

Keywords

Comments

All the odd fixed points of map n -> A005940(n) [and its inverse, map n -> A005941(n)] are included in this sequence. This includes both the known odd fixed points, 1, 3 and 5 (see A029747), and any additional hypothetical odd composites that would satisfy the condition n == A005940(n).
This is a subsequence of A364561, so the comments given in A364564 apply also here.

Examples

			       k  A156552(k)    A156552(k)/k  k-(1+A156552(k)) factorization of k
       1:       0         0                0
       3:       2         0.6666667        0
       5:       4         0.8              0
      21:      18         0.8571429        2           (3 * 7)
     323:     320         0.9907121        2           (17 * 19)
   66297:   65714         0.9912062      582           (3 * 7^2 * 11 * 41)
  139965:  139306         0.9952917      658           (3 * 5 * 7 * 31 * 43)
  263375:  262364         0.9961614     1010           (5^3 * 7^2 * 43)
  264845:  264244         0.9977307      600           (5 * 7^2 * 23 * 47)
  528581:  528576         0.9999905        4           (17^2 * 31 * 59).
		

Crossrefs

Subsequence of A364561.
Cf. also A364551, A364564, A364572.

A364547 Odd numbers k such that k is a multiple of A005940(k).

Original entry on oeis.org

1, 3, 5, 1035, 524295, 16777217
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Sequence A005941(A364549(.)) sorted into ascending order.
Those terms of A000051 (= 2^k + 1) are included that have A000040(1+k) as one of their prime factors.
a(7) > 402653184.
See also comments in A364963. - Antti Karttunen, Jan 12 2024

Examples

			1035 is included because 1034 in binary is "10000001010", which Doudna isomorphism maps to 345 = 3*5*23, which thus divides 1035 (= 3^2 * 5 * 23). Note that there are six 0's in the binary representation between its most significant bit and the trailing "1010", thus we get the prime factors A000040(1+1) = 3, A000040(1+1+1) = 5 and A000040(1+1+1+6) = 23.
524295 is included because 524294 in binary is "10000000000000000110", which Doudna isomorphism maps to 549 = 3^2 * 61, which thus divides 524295 (= 3^2 * 5 * 61 * 191). Note that there are sixteen 0's in the binary representation between its most significant bit and the trailing "110", thus we get the prime factors A000040(2) = 3 and A000040(2+16) = 61.
16777217 = 2^24 + 1 is included because A000040(1+24) = 97, and 16777217 = 97*257*673.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^20 + 2; Array[Set[a[#], #] &, 2]; {1}~Join~Reap[Do[If[EvenQ[n], Set[a[n], 2 a[n/2]], a[n] = k = Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &, FactorInteger[a[(n + 1)/2]]]; If[Divisible[n, a[n]], Sow[n]]], {n, 3, nn}] ][[-1, 1]] (* Michael De Vlieger, Jul 28 2023 *)
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    isA364547(n) = ((n%2)&&!(n%A005940(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

A364564 Largest prime factor computed for those odd numbers k for which A156552(k) < k.

Original entry on oeis.org

1, 3, 5, 3, 5, 7, 5, 3, 7, 5, 7, 11, 7, 5, 11, 3, 13, 11, 7, 11, 5, 5, 13, 7, 11, 13, 7, 17, 7, 13, 17, 5, 11, 3, 7, 13, 11, 17, 11, 7, 19, 13, 7, 13, 17, 11, 5, 11, 5, 17, 13, 7, 13, 11, 13, 7, 11, 17, 7, 13, 17, 11, 5, 19, 13, 17, 19, 5, 11, 13, 3, 7, 19, 17, 13, 11, 17, 13, 11, 17, 7, 11, 19, 17, 7, 19, 13, 13
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

These primes must stay reasonably small, but how small?
See also the example section of A364551.

Crossrefs

Formula

a(n) = A006530(A364561(n)).

A364965 Odd numbers k such that k is a multiple of A243071(k).

Original entry on oeis.org

3, 27, 315, 3003, 42757, 72765, 195195, 799425, 13873275, 18131225
Offset: 1

Views

Author

Antti Karttunen, Sep 01 2023

Keywords

Crossrefs

Odd terms in A364964.
Sequence A163511(A364495(n)), for n>1, sorted into ascending order.
Cf. A243071.
Cf. also A364498, A364551.

Programs

  • PARI
    A243071(n) = if(n<=2, n-1, 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]); ((3<<#binary(res\2))-res-1)); \\ (Combining programs given in A156552 and A054429)
    isA364965(n) = ((n>1)&&(n%2)&&!(n%A243071(n)));
Showing 1-9 of 9 results.