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

A064627 Positive integers not in A064494.

Original entry on oeis.org

2, 3, 5, 7, 10, 11, 13, 17, 19, 21, 23, 25, 27, 29, 30, 31, 37, 41, 42, 43, 45, 47, 50, 53, 54, 59, 61, 63, 65, 66, 67, 69, 71, 73, 74, 78, 79, 83, 85, 86, 89, 93, 97, 99, 101, 103, 105, 107, 109, 110, 112, 113, 115, 117, 119, 123, 126, 127, 129, 131, 135, 137, 138
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 16 2001

Keywords

Crossrefs

Cf. A064494.

Programs

  • SageMath
    def divsign(s, k):
        if not k.divides(s): return 0
        return (-1)^(s//k)*k
    def A(n):
        s = n + 1
        for k in srange(n, 1, -1):
            s -= divsign(s, k)
        return s
    # Use with caution: search range must be adjusted as necessary!
    def A064627List(size):
        return sorted(Set([A(n) for n in (1..3*size)]))[0:size]
    print(A064627List(63)) # Peter Luschny, Sep 16 2019

A064590 Ordered values of A064494.

Original entry on oeis.org

1, 4, 6, 8, 9, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 32, 33, 34, 35, 36, 38, 39, 40, 44, 46, 48, 49, 51, 52, 55, 56, 57, 58, 60, 62, 64, 68, 70, 72, 75, 76, 77, 80, 81, 82, 84, 87, 88, 90, 91, 92, 94, 95, 96, 98, 100, 102, 104, 106, 108, 111, 114, 116, 118, 120, 121, 122
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 16 2001

Keywords

Crossrefs

A064728 Solutions to A064494(n) = 2(n+1).

Original entry on oeis.org

3, 5, 6, 7, 11, 12, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 117, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 198, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 17 2001

Keywords

Crossrefs

A327093 Sequence obtained by swapping each (k*(2n))-th element of the positive integers with the (k*(2n-1))-th element, for all k > 0, in ascending order.

Original entry on oeis.org

2, 3, 7, 5, 11, 13, 15, 10, 17, 19, 23, 25, 27, 21, 40, 16, 35, 36, 39, 37, 58, 33, 47, 50, 52, 43, 45, 34, 59, 78, 63, 31, 76, 55, 82, 67, 75, 57, 99, 56, 83, 112, 87, 61, 126, 69, 95, 92, 97, 96, 133, 71, 107, 81, 142, 79, 139, 91, 119, 155, 123, 93, 122, 51, 151, 146, 135
Offset: 1

Views

Author

Jennifer Buckley, Sep 13 2019

Keywords

Comments

Start with the sequence of positive integers [1, 2, 3, 4, 5, 6, 7, 8, ...].
Swap all pairs specified by k=1, that is, do the swaps (2,1),(4,3),(6,5),(8,7),..., resulting in [2, 1, 4, 3, 6, 5, 8, 7, ...], so the first term of the final sequence is 2 (No swaps for k>1 will affect this term).
Swap all pairs specified by k=2, that is, do the swaps (4,2),(8,6),(12,10),(16,14),..., resulting in [2, 3, 4, 1, 6, 7, 8, 5, ...], so the second term of the final sequence is 3 (No swaps for k>2 will affect this term).
Swap all pairs specified by k=3, that is, do the swaps (6,3),(12,9),(18,15),(24,21),... .
Continue for all values of k.
The complementary sequence 1, 4, 6, 8, 9, 12, 14, 18, 20, 22, 24, 26, 28, ... lists the numbers that never appear. Is there an alternative characterization of these numbers?
Equivalently, is there a characterization of the numbers (2, 3, 5, 7, 10, 11, 13, 15, 16, 17, 19, 21, 23, ...) that do appear? - N. J. A. Sloane, Sep 13 2019

Crossrefs

For the sorted terms and the missing terms see A327445, A327446.

Programs

  • Go
    func a(n int) int {
        for k := n; k > 0; k-- {
            if n%k == 0 {
                if (n/k)%2 == 0 {
                    n = n - k
                } else {
                    n = n + k
                }
            }
        }
        return n
    }
    
  • SageMath
    def a(n):
        for k in srange(n, 0, -1):
            if k.divides(n):
                n += k if is_odd(n//k) else -k
        return n
    print([a(n) for n in (1..67)]) # Peter Luschny, Sep 14 2019

A327446 Numbers missing from A327093.

Original entry on oeis.org

1, 4, 6, 8, 9, 12, 14, 18, 20, 22, 24, 26, 28, 29, 30, 32, 38, 41, 42, 44, 46, 48, 49, 53, 54, 60, 62, 64, 65, 66, 68, 70, 72, 73, 74, 77, 80, 84, 85, 86, 90, 94, 98, 100, 102, 104, 106, 108, 109, 110, 111, 114, 116, 118, 120, 124, 125, 128, 130, 132, 136, 137, 138, 140, 149, 150
Offset: 1

Views

Author

N. J. A. Sloane, Sep 14 2019

Keywords

Comments

It would be nice to have an alternative characterization of these numbers.

Crossrefs

Programs

  • SageMath
    # Use with caution: search range must be adjusted as necessary!
    def A327446List(size):
        return sorted(Set([A327419(n) for n in (1..3*size)]))[0:size]
    print(A327446List(66)) # Peter Luschny, Sep 16 2019

A372297 Limit of the recursion B(k) = T[k](B(k-1)), where B(1) = (1,2,3,4,5,...) and T[k] is the transformation that permutes the entries k(2i-1) and k(2i) for all positive integers i, if k is prime.

Original entry on oeis.org

1, 4, 8, 2, 12, 3, 16, 6, 10, 5, 24, 9, 28, 7, 18, 14, 36, 15, 40, 20, 26, 11, 48, 21, 27, 13, 32, 22, 60, 25, 64, 30, 42, 17, 39, 33, 76, 19, 50, 35, 84, 38, 88, 34, 52, 23, 96, 45, 54, 46, 66, 44, 108, 51, 63, 49, 74, 29, 120, 55, 124, 31, 65, 62, 75
Offset: 1

Views

Author

Jennifer Buckley, Apr 25 2024

Keywords

Comments

Sequence contains all positive integers.
a(2p) = p for all prime numbers p.

Examples

			B(1) = 1,2,3,4, 5,6,7,8, 9,10,11,12,13,14,...
B(2) = 1,4,3,2, 5,8,7,6, 9,12,11,10,13,16,...
B(3) = 1,4,8,2, 5,3,7,6,10,12,11, 9,13,16,...
B(4) = 1,4,8,2, 5,3,7,6,10,12,11, 9,13,16,... (No change)
B(5) = 1,4,8,2,12,3,7,6,10, 5,11, 9,13,16,...
		

Crossrefs

Cf. A064494.

Programs

  • Mathematica
    max = 66; b[1, j_] := j; b[k_, j_] := b[k, j] = b[k-1, j]; Do[If[PrimeQ[k],b[k, 2j*k-k] = b[k-1, 2j*k]; b[k, 2j*k] = b[k-1, 2j*k-k],b[k,j ]=b[k-1,j]], {k, 2, max}, {j, 1, max}]; a[n_] := b[max, n]; Table[a[n], {n, 1, max}]

A266679 Positive integers not shotgun (or Schrotschuss) numbers, in order of the first number to be permuted forward by the transformations T[k] where k = 2 or k is odd.

Original entry on oeis.org

2, 3, 5, 7, 10, 11, 13, 21, 17, 19, 30, 23, 27, 25, 29, 31, 45, 42, 37, 54, 41, 43, 65, 47, 50, 69, 53, 66, 78, 59, 61, 63, 86, 67, 93, 71, 73, 105, 85, 79, 74, 83, 110, 117, 89, 112, 126, 115, 97, 99, 101
Offset: 1

Views

Author

Timothy Mott, Jan 02 2016

Keywords

Comments

In the construction of the shotgun numbers (A064494), the first element to be shifted forward by T[k] where k = 2 or k is odd will also be shifted forward by subsequent transformations T[2^n*k], and will therefore not appear in that sequence. In particular, no prime numbers appear in A064494, and an odd prime p is element (p+1)/2 in this list.

Crossrefs

Cf. A064494. Sorted gives A064627.
Showing 1-7 of 7 results.