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

A356867 For n >= 1, write n = 3^m + k, where m >= 0 is the greatest power of 3 <= n, and k is in the range 0 <= k < 3^(m+1) - 3^m, then for n such that k=0, a(n)=n, and for n such that k > 0, a(n) is the smallest prime multiple p*a(k), p != 3, that is not already a term.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 10, 8, 9, 7, 14, 15, 25, 20, 12, 50, 16, 18, 35, 28, 30, 125, 40, 24, 100, 32, 27, 11, 22, 21, 55, 44, 42, 70, 56, 45, 49, 98, 75, 175, 140, 60, 250, 80, 36, 245, 196, 150, 625, 200, 48, 500, 64, 54, 77, 110, 105, 275, 88, 84, 350, 112, 90, 343
Offset: 1

Views

Author

David James Sycamore, Sep 01 2022

Keywords

Comments

Any prime p may be used to generate a sequence D(p) of this kind. The present sequence is D(3), and D(2) is the Doudna sequence, A005940.
Conjectured to be a permutation of the positive integers in which the primes appear in order.
From Antti Karttunen, Sep 16 2023: (Start)
The conjecture is true: Sequence is a permutation of natural numbers. By definition it is injective, and the surjectivity is guaranteed by the fact that there are infinitely many such n > k encountered by the greedy algorithm that a(n) will be a multiple of a(k), and "the smallest prime multiple" condition guarantees that all multiples of a(k) will eventually appear. That the primes and A100484 appear in order follows from the formulas a(3^m + 1) = prime(m+2), and a(3^m + 2) = 2*prime(m+2).
If the base-3 representation of n-1 has the base-3 representation of k-1 as its suffix, then a(n) is a multiple of a(k). For example, A007089(16-1) = 120, and A007089(43-1) = 1120, thus the former is the suffix of the latter, and a(16) = 50 indeed divides a(43) = 250.
(End)

Examples

			n=1=3^0+0 so a(1)=1. n=2=3^0+1 so k=1 and a(2)=2. Similarly a(3)=3 and a(9)=9.
n=10=3^2+1, therefore k=1 and a(1)=1 so a(10)=1*7=7 (since 2 and 5 have already occurred).
		

Crossrefs

Cf. A007089, A007949, A011655, A048473, A100484, A053735, A364958 (fixed points), A365390 (inverse permutation), A365424, A365459, A365462 [= a(n)-n], A365463 [= gcd(a(n),n)], A365464, A365465, A365717 [= A348717(a(1+n))], A365719 [= A046523(a(1+n))], A365721 [= omega(a(1+n))], A365722 [= bigomega(a(1+n))].
Cf. also A005940, A364611, A364628 for variants D(2), D(5) and D(7).

Programs

Formula

a(3^m + 1) = prime(m+2) for m >= 1.
Conjectures from Jianing Song, Nov 23 2022: (Start)
(1) a(3^m+2) = 2*prime(m+2) for m >= 2. - [The conjecture is true because a(2) = 2 and 3^m + 2 < 3^(1+m) + (3^m) + 1 for all m - Antti Karttunen, Sep 16 2023]
(2) For n > m >= 1, a(3^n+3^m+1) = prime(m+2)^2 for n = m+1; prime(n+2)*prime(m+2)^2 for n >= m+2.
(3) For n > m >= 1, a(3^n+3^m+2) = 4*prime(n+2) for n >= 3, m = 1; 2*prime(m+2)^2 for n = m+1, m >= 2; 2*prime(m+2)*prime(m+3) for n = m+2, m >= 2; 2*prime(n+2)*prime(m+2)^2 for n >= m+3, m >= 2. (End)
From Antti Karttunen, Sep 17 2023: (Start)
If A053735(n) = 1, then a(n) = n, otherwise a(n) = A365424(n) * a(A365459(n)).
For all n >= 1, A007949(a(n)) = A007949(n) and a(3*n) = 3*a(n).
For n >= 1, a(3^n - 1) = 2^(2n - 1), a(A048473(n)) = 2^(2*(n-1)).
These are conjectures so far:
For n >= 1, a(3^n - 2) = 10^(n-1).
For n >= 2, a(3^n - 3) = A002023(n-2) = 6*4^(n-2).
(End)

Extensions

More terms from Michael De Vlieger, Sep 01 2022

A364628 For p = 7 and n > 0, write n = p^m + k, m >= 0, with maximal p^m <= n, with 0 <= k < p^(m+1) - p^m, then for n such that k=0, a(n)=n, and for n such that k > 0, a(n) is the smallest q*a(k), prime q != p, that is not already a term.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 7, 3, 6, 12, 24, 48, 64, 14, 9, 18, 36, 72, 96, 128, 28, 27, 54, 108, 144, 192, 256, 56, 81, 162, 216, 288, 384, 512, 112, 243, 324, 432, 576, 768, 1024, 224, 486, 648, 864, 1152, 1536, 2048, 49, 5, 10, 20, 40, 80, 160, 21, 15, 30, 60, 120
Offset: 1

Views

Author

Michael De Vlieger, Sep 16 2023

Keywords

Comments

This is sequence D(p), p = 7, where the Doudna sequence A005940 is D(2).

Crossrefs

Cf. A005940 (D(2)), A356867 (D(3)), A364611 (D(5)).

Programs

  • Mathematica
    p = 7; nn = 343; c[_] = False;
    Do[Set[{m, k}, {1, n - p^Floor[Log[p, n]]}];
      If[k == 0,
       Set[{a[n], c[n]}, {n, True}],
       While[Set[t, Prime[m] a[k]]; Or[m == i, c[t]], m++];
       Set[{a[n], c[t]}, {t, True}]], {n, nn}];
    Array[a, nn]

A364902 Let x, y be the greatest exponents of 2, 3 respectively such that 2^x, 3^y do not exceed n and let k_2, k_3 be n - 2^x, and n - 3^y respectively. Then for n such that k_2 = 0 or k_3 = 0, a(n) = n, else a(n) is the least novel number Min{p*a(k_2), q*a(k_3)}, where p, q are primes not equal to either 2 or 3.

Original entry on oeis.org

1, 2, 3, 4, 5, 10, 15, 8, 9, 7, 14, 20, 25, 35, 50, 16, 11, 22, 21, 28, 55, 70, 75, 40, 45, 49, 27, 13, 26, 33, 44, 32, 17, 34, 39, 52, 65, 98, 100, 56, 63, 77, 80, 121, 110, 105, 140, 112, 143, 154, 147, 196, 245, 135, 91, 130, 165, 220, 160, 85, 170, 195, 260, 64, 19, 38, 51, 68
Offset: 1

Views

Author

Keywords

Comments

Motivated by the recursion D(2) known to reproduce A005940, this sequence uses a compound version based on a squarefree semiprime (6) rather than a prime, in which the terms are generated by a greedy algorithm related to the distances between n and the greatest powers of 2, and 3 not exceeding n. After a(9) = 9 each power of 2 or 3 is followed by the smallest prime not yet in the sequence. (e.g. 11 follows 16, 13 follows 27, etc).
There are no multiples of 6 in this sequence.
For k > 2, if a(i) = prime(k) = p and a(j) = p^2 then j-i is a term in A006899 (e.g. a(17) = 11, a(44) = 121 and 44 - 17 = 27 = 3^3).
Conjectures: (i). This is a permutation of A047253 with primes in order; (ii). All terms between consecutive prime terms, prime(k), prime(k+1) are prime(k)-smooth.

Examples

			a(n) = n for n <= 4 because all such n are powers of 2 or 3.
a(5) = least novel Min{a(1)*p,a(2)*q} = Min{p,2*q} for o,q prime != 2 or 3, so a(5) = 5.
17=16+1=9+8, so a(17) = least novel Min{a(1)*p,a(8)*q} = Min{p,8*q} = 11.
Data can be shown in tabular form in two distinct ways: First row starts with 1 and then rows start with a prime; alternatively each row starts with 2^i or 3^j:
 1;                       1;
 2;                       2;
 3,4;                     3;
 5,10,15,8,9;             4,5,10,15;
 7,14,20,25,35,50,16;     8;
 11,22,21,28,55...        9,7,14,20,25,35,50
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[_] = False; s = {1, 2}; w = Length[s]; t = Prime[s]; flag = 0;
    Array[Set[{q[#1], p[#1],
          r[#1]}, {#1, #2,
            Prepend[#2^Range[Floor@Log[#2, nn]], 1]} & @@ {#2,
           Prime[#2]}] & @@ {#, s[[#]]} &, w];
    Do[If[n == 1,
       Set[{a[n], c[1]}, {1, True}],
       Array[Set[m[#], 1] &, w];
       Array[Set[j[#], n - p[#]^(-1 + LengthWhile[r[#], # < n + 1 &])] &, w];
       Array[
        If[j[#] == 0,
          k[#] = n; flag = #,
          While[Set[k[#], Prime[m[#]] a[j[#]]];
           Or[MemberQ[s, m[#]], c[k[#]]], m[#]++]] &, w];
       If[flag > 0,
        Set[{a[n], c[k[flag]]}, {k[flag], True}]; flag = 0,
        Set[{a[n], c[#]}, {#, True}] &[Min@ Array[k, w]] ]], {n, nn}];
    Array[a, nn] (* Michael De Vlieger, Sep 24 2023 *)

Formula

For n > 6, a(A006899(n) + 1) = prime(n-2).
Showing 1-3 of 3 results.