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.

A269847 Permutation of natural numbers: a(1) = 1, for n > 1, if n is an odd prime, a(n) = A003961(a(A000720(n))), otherwise a(n) = 2*a(n-A000720(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 10, 12, 7, 18, 15, 16, 20, 24, 25, 14, 27, 36, 30, 32, 21, 40, 48, 50, 28, 54, 45, 72, 11, 60, 64, 42, 80, 96, 75, 100, 56, 108, 35, 90, 81, 144, 22, 120, 63, 128, 84, 160, 192, 150, 135, 200, 112, 216, 70, 180, 49, 162, 33, 288, 44, 240, 126, 256, 125, 168, 320, 384, 225, 300, 105, 270, 400
Offset: 1

Views

Author

Antti Karttunen, Mar 06 2016

Keywords

Crossrefs

Inverse: A269848.
Related or similar permutations: A071574, A163511, A246681, A257730, A269857.

Formula

a(1) = 1, and for n > 1, if n is an odd prime, a(n) = A003961(a(A000720(n))), otherwise [when n is 2 or composite] a(n) = 2*a(n-A000720(n)).
a(1) = 1; if n is an odd prime, a(n) = A003961(a(A026233(n))), else a(n) = A005843(a(A026233(n))).
Declarative definition:
a(1)=1, a(A065091(n)) = A003961(a(n+1)), a(A065090(n+1)) = 2*a(n).
As a composition of other permutations:
a(n) = A163511(A071574(n)).
Other identities. For all n >= 1:
a(A007097(n)) = A000040(n). [Maps the terms of primeth recurrence to primes.]

A269858 Permutation of natural numbers: a(1) = 1, a(2n) = A065090(1+a(n)), a(2n+1) = A000040(a(A268674(2n+1))).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 11, 8, 7, 9, 31, 10, 127, 18, 13, 14, 709, 12, 5381, 15, 19, 45, 52711, 16, 17, 165, 23, 27, 648391, 21, 9737333, 22, 29, 856, 41, 20, 174440041, 6185, 61, 24, 3657500101, 28, 88362852307, 63, 43, 58644, 2428095424619, 25, 59, 26, 37, 212, 75063692618249, 34, 67, 39, 47
Offset: 1

Views

Author

Antti Karttunen, Mar 06 2016

Keywords

Comments

Terms for prime positions copied from A007097.

Crossrefs

Inverse: A269857.
Related or similar permutations: A237739, A252756, A269848.

Formula

a(1) = 1, a(2) = 2, for n > 2, if n is even, a(n) = A002808(a(n/2)-1), and for odd n, a(n) = A000040(a(A268674(n))).
As a composition of other permutations:
a(n) = A237739(A252756(n)).
Other identities. For all n >= 1:
a(A000040(n)) = A007097(n). [Maps primes to the primeth recurrence.]

A371985 For n a power of 2, a(n) = n. Otherwise a(n) is the smallest novel multiple of a(n - 2^m), where 2^m is the greatest power of 2 not exceeding n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 12, 20, 15, 18, 27, 16, 11, 14, 21, 24, 25, 30, 36, 40, 28, 50, 48, 60, 45, 54, 81, 32, 13, 22, 33, 44, 35, 42, 63, 56, 49, 70, 72, 80, 75, 90, 108, 96, 55, 84, 105, 120, 100, 150, 144, 160, 112, 200, 192, 180, 135, 162, 243, 64, 17
Offset: 1

Views

Author

David James Sycamore, Apr 15 2024

Keywords

Comments

Reminiscent of the Doudna sequence A005940; also of A052330 and A269848.
All powers of 2 (a(n) = n) are assigned first in order to avoid the second part of the definition giving a(n) = 2^k for some n which is not a power of 2 (see Example for a(12) = 20).
It follows from the definition that all powers of 2, all primes and all multiples of all primes are terms so this sequence is a permutation of the positive integers (A000027), with primes in order.
Each prime power appears before any of its multiples, meaning that this sequence has "property S" as defined in A368900.

Examples

			a(3) = 3, because 2 is the greatest power of 2 not exceeding 3 and 3-2 = 1, so a(3) = 3, the least novel multiple of a(1) = 1.
a(12) is the smallest novel multiple of a(12-8) = a(4) = 4, and at this point in the sequence 4,8,12 are all prior terms and a(16) = 16 is already taken, so a(12) = 20.
		

Crossrefs

Programs

  • Mathematica
    nn = 10; c[] := False; m[] := 1; a[1] = 1; c[1] = True;
    Do[If[i == 0,
       k = 2^j + i,
       (While[Set[k, m[#] #]; Or[c[k], IntegerQ@ Log2[k]], m[#]++]) &@ a[i]];
      Set[{a[2^j + i], c[k]}, {k, True}], {j, nn}, {i, 0, 2^j - 1}];
    Array[a, 2^(nn + 1) - 1] (* Michael De Vlieger, Apr 15 2024 *)
  • PARI
    \\ See PARI link

Formula

a(2^k + 1) = prime(k+1).
Showing 1-3 of 3 results.