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.

Previous Showing 21-23 of 23 results.

A357268 If n is a power of 2, a(n) = n. Otherwise, if 2^j is the greatest power of 2 not exceeding n, and if k = n - 2^j, then a(n) is the smallest m*a(k) which has not occurred already, where m is an odd number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 25, 18, 27, 16, 11, 14, 21, 20, 35, 30, 45, 24, 49, 50, 75, 36, 125, 54, 81, 32, 13, 22, 33, 28, 55, 42, 63, 40, 77, 70, 105, 60, 175, 90, 135, 48, 99, 98, 147, 100, 245, 150, 225, 72, 343, 250, 375, 108, 625, 162, 243, 64, 17
Offset: 1

Views

Author

David James Sycamore, Sep 21 2022

Keywords

Comments

The definition implies that if n is not a power of 2, then neither is a(n).
Similar to the Doudna sequence (A005940), except that here the multiple of a(k) used to compute a(n) is the least odd number (rather than the least odd prime), such that a(n) is a novel term. Terms are the same as in A005940 until a(49)=99 (instead of 121), subsequent to which further odd nonprime multiples produce more differences from A005940; the next is a(71)=117 (instead of 99).
A permutation of the positive integers, in which the primes appear in natural order, but the odd numbers do not (9 precedes 7, 25 precedes 21, etc.).

Examples

			n = 49 = 2^5 + 17, and a(17) = 11, so a(49) is the least m*a(17) which has not occurred earlier, where m is an odd number. Up to this point we have seen 3*11, 5*11, 7*11, but not 9*11. Therefore a(49) = 9*11 = 99 (compare with A005940(71)=99).
		

Crossrefs

Programs

Formula

a(2^n + 1) is the smallest odd number which has not already occurred.

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

A365389 a(n) = A365390(n) - 1.

Original entry on oeis.org

0, 1, 2, 4, 3, 5, 9, 7, 8, 6, 27, 14, 81, 10, 11, 16, 243, 17, 729, 13, 29, 28, 2187, 23, 12, 82, 26, 19, 6561, 20, 19683, 25, 83, 244, 18, 44, 59049, 730, 245, 22, 177147, 32, 531441, 31, 35, 2188, 1594323, 50, 36, 15, 731, 85, 4782969, 53, 30, 34, 2189, 6562, 14348907, 41, 43046721, 19684, 89, 52, 84, 86, 129140163
Offset: 1

Views

Author

Antti Karttunen, Sep 16 2023

Keywords

Crossrefs

One less than A365390.
Cf. A356867.
Cf. also A156552.
Previous Showing 21-23 of 23 results.