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

A353716 The values of b(k)+b(k+1), k >= 0, sorted into increasing order, where b is A353709.

Original entry on oeis.org

1, 3, 6, 11, 12, 15, 19, 23, 28, 43, 44, 46, 49, 51, 54, 58, 61, 63, 69, 77, 79, 86, 87, 90, 92, 95, 102, 104, 107, 109, 113, 123, 125, 126, 127, 142, 143, 155, 156, 157, 161, 167, 171, 183, 187, 191, 207, 221, 226, 231, 233, 234, 239, 240, 242, 252, 253, 254, 255, 277, 279, 286, 311, 313, 319, 333, 334, 348, 351, 354, 357, 365, 372, 383, 387
Offset: 1

Views

Author

N. J. A. Sloane, May 09 2022

Keywords

Comments

The sequence [A353709(k)+A353709(k+1) for k >= 0] (unsorted) is A353715.

Crossrefs

A353955 a(n) = A019565(A353709(n)).

Original entry on oeis.org

1, 2, 3, 5, 7, 6, 11, 35, 13, 22, 15, 91, 17, 10, 21, 143, 34, 105, 19, 26, 33, 85, 14, 39, 55, 119, 78, 95, 77, 51, 65, 154, 57, 221, 70, 209, 663, 23, 110, 273, 323, 46, 165, 1547, 38, 69, 385, 442, 437, 231, 130, 391, 133, 30, 187, 247, 42, 935, 299, 114, 595
Offset: 0

Views

Author

Michael De Vlieger, May 12 2022

Keywords

Comments

Interpretation of A353709(n) written in binary instead as if written in "multiplicity notation", that is, as if we write 1 if divisible by prime(k+1), otherwise 0 in the k-th place. Example, decimal 12 is written in binary as 1100 = 2^2 + 2^3, and take exponents 2 and 3 and instead construe them as prime(2+1) * prime(3+1) = 5*7 = 35.
If A353709 is a permutation of nonnegative numbers, then this sequence is a permutation of squarefree numbers A005117.

Examples

			Table showing n, A353709(n), and b(n), the binary expansion of A353709(n) writing "." for zeros for clarity. a(n) interprets 1's in the k-th place of b(n) as prime(k+1) and thereafter takes the product. We find a(n) = A005117(j).
   n A353709(n) b(n)  a(n)   j
  ----------------------------
   1    0         .     1    1
   2    1         1     2    2
   3    2        1.     3    3
   4    4       1..     5    4
   5    8      1...     7    6
   6    3        11     6    5
   7   16     1....    11    8
   8   12      11..    35   23
   9   32    1.....    13    9
  10   17     1...1    22   15
  11    6       11.    15   11
  12   40    1.1...    91   57
  13   64   1......    17   12
  14    5       1.1    10    7
  15   10      1.1.    21   14
  16   48    11....   143   89
  ...
		

Crossrefs

Programs

  • Mathematica
    nn = 2^7; c[_] = -1; c[0] = i = 0; a[0] = c[1] = j = 1; a[1] = u = 2; Do[k = u; While[Nand[c[k] == -1, BitAnd[i, k] == 0, BitAnd[j, k] == 0], k++]; If[k == u, While[c[u] > -1, u++]]; i = j; j = k; Set[{a[n], c[k]}, {Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, Reverse@ IntegerDigits[k, 2]], n}], {n, 2, nn}]; Array[a, nn + 1, 0]

Formula

a(n) = Product p_k where A353709(n) = Sum 2^(k-1).

A084937 Smallest number which is coprime to the last two predecessors and has not yet appeared; a(1)=1, a(2)=2.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 8, 11, 13, 6, 17, 19, 10, 21, 23, 16, 15, 29, 14, 25, 27, 22, 31, 35, 12, 37, 41, 18, 43, 47, 20, 33, 49, 26, 45, 53, 28, 39, 55, 32, 51, 59, 38, 61, 63, 34, 65, 57, 44, 67, 69, 40, 71, 73, 24, 77, 79, 30, 83, 89, 36, 85, 91, 46, 75, 97, 52, 81
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 13 2003

Keywords

Comments

Equivalently, this is the lexicographically earliest sequence of positive numbers satisfying the condition that each term is relatively prime to the next two terms. - N. J. A. Sloane, Nov 03 2014
Empirically, the points lie roughly on two lines: if n == 2 mod 3 then a(n) ~= 2n/3, otherwise a(n) ~= 4n/3. See A249680-A249683 for the three trisections, and see also the Sigrist scatterplot. - N. J. A. Sloane, Nov 03 2014, Nov 04 2014
All primes and prime powers occur, and the primes occur in their natural order. For any prime p, p occurs before p^2 before p^3, ...
Empirically, this is a permutation of the natural numbers, with inverse A084933: a(A084933(n))=A084933(a(n))=n. It seems that there are no further fixed points after {1,2,3,8,33,39}. Empirically, a(n) mod 2 = A011655(n+1); ABS(a(n)-n) < n; a(3*n+1)>n; a(3*n+2)Reinhard Zumkeller, Dec 16 2007
For a(n) mod 3 see A249603. - N. J. A. Sloane, Nov 03 2014
A249694(n) = GCD(a(n),a(n+3)). - Reinhard Zumkeller, Nov 04 2014

Crossrefs

Cf. A084933 (inverse), A103683, A121216, A247665, A090252, A249603 (read mod 3), A249680, A249681, A249682, A249683 (trisections), A249694, A011655, A249684 (numbers that take a record number of steps to appear), A249685.
Indices of primes: A249602, and of prime powers: A249575.
Running counts of missing numbers: A249686, A250099, A250100; A249777, A249856, A249857.
Where a(3n)>a(3n+1): A249689.
See also A353706, A353709, A353710.

Programs

  • Haskell
    import Data.List (delete)
    a084937 n = a084937_list !! (n-1)
    a084937_list = 1 : 2 : f 2 1 [3..] where
       f x y zs = g zs where
          g (u:us) | gcd y u > 1 || gcd x u > 1 = g us
                   | otherwise = u : f u x (delete u zs)
    -- Reinhard Zumkeller, Jan 28 2012
    
  • Maple
    N:= 1000: # to get a(n) until the first entry > N
    a[1]:= 1: a[2]:= 2:
    R:= {$3..N}:
    for n from 3 while R <> {} do
      success:= false;
      for r in R do
        if igcd(r,a[n-1]) = 1 and igcd(r,a[n-2])=1 then
           a[n]:= r;
           R:= R minus {r};
           success:= true;
           break
        fi
      od:
      if not success then break fi;
    od:
    seq(a[i], i = 1 .. n-1); # Robert Israel, Dec 12 2014
  • Mathematica
    lst={1,2,3}; unused=Range[4,100]; While[n=Select[unused, CoprimeQ[#, lst[[-1]]] && CoprimeQ[#, lst[[-2]]] &, 1]; n != {}, AppendTo[lst, n[[1]]]; unused=DeleteCases[unused, n[[1]]]]; lst
    f[s_] := Block[{k = 1, l = Take[s, -2]}, While[ Union[ GCD[k, l]] != {1} || MemberQ[s, k], k++]; Append[s, k]]; Nest[f, {1, 2}, 67] (* Robert G. Wilson v, Jun 26 2011 *)
  • PARI
    taken(k,t=v[k])=for(i=3,k-1, if(v[i]==t, return(1))); 0
    step(k,g)=while(gcd(k,g)>1, k++); k
    first(n)=local(v=vector(n,i,i)); my(nxt=3,t); for(k=3,n, v[k]=step(nxt, t=v[k-1]*v[k-2]); while(taken(k), v[k]=step(v[k]+1,t)); if(v[k]==t, while(taken(k+1,t++),))); v \\ Charles R Greathouse IV, Aug 26 2016
  • Python
    from math import gcd
    A084937_list, l1, l2, s, b = [1,2], 2, 1, 3, set()
    for _ in range(10**3):
        i = s
        while True:
            if not i in b and gcd(i,l1) == 1 and gcd(i,l2) == 1:
                A084937_list.append(i)
                l2, l1 = l1, i
                b.add(i)
                while s in b:
                    b.remove(s)
                    s += 1
                break
            i += 1 # Chai Wah Wu, Dec 09 2014
    

Extensions

Entry revised by N. J. A. Sloane, Nov 04 2014

A353725 Records in A353724.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 16, 17, 18
Offset: 1

Views

Author

N. J. A. Sloane, May 11 2022

Keywords

Comments

Motivated by a comment in A353715.

Examples

			Table from _Walter Trump_, May 11 2022, showing initial terms of A353725 (column 1) and A353726 (column 3). The central column shows the corresponding entry of A353715 written in base 2.
   0                                1         0
   1                              110         2
   2                             1100         3
   3                          1101000        11
   4                         11110000        54
   5                       1111100000        74
   6                      11101000000        88
   7                     110110000000       183
  12                11111000000000000      3913
  13          10011111110000000000000    124845
  16      111111111110000000000000000   2469947
  17     1111111101100000000000000000   4005550
  18  1011111111111000000000000000000  19917707
		

Crossrefs

Extensions

a(10)-a(13) from Walter Trump, May 11 2022

A353724 a(n) = exponent of highest power of 2 that divides A353715(n).

Original entry on oeis.org

0, 0, 1, 2, 0, 0, 2, 2, 0, 0, 1, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 2, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 4, 0, 0, 2, 0, 0, 2, 0, 0, 1, 0, 0, 1, 3, 0, 0, 2, 0, 0, 1, 5, 0, 0, 4, 0, 0, 2, 1, 0, 0, 3, 0, 0, 3, 6, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 2, 1, 0, 0, 1, 1, 2, 0, 0, 2, 0
Offset: 0

Views

Author

N. J. A. Sloane, May 11 2022

Keywords

Examples

			A353715(3) = 12 = 2^2*3, so a(3) = 2. A353715(11) = 104 = 2^3*13, so a(11) = 3.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A353724_gen(): # generator of terms
        s, a, b, c, ab = {0,1}, 0, 1, 2, 1
        yield 0
        while True:
            for n in count(c):
                if not (n & ab or n in s):
                    yield len(t := bin(b+n))-len(t.rstrip('0'))
                    a, b = b, n
                    ab = a|b
                    s.add(n)
                    while c in s:
                        c += 1
                    break
    A353724_list = list(islice(A353724_gen(),30)) # Chai Wah Wu, May 11 2022

A353726 Indices of records in A353724.

Original entry on oeis.org

0, 2, 3, 11, 54, 74, 88, 183, 3913, 124845, 2469947, 4005550, 19917707
Offset: 1

Views

Author

N. J. A. Sloane, May 11 2022

Keywords

Crossrefs

Extensions

a(10)-a(13) from Walter Trump, May 11 2022

A353718 Lengths of runs of identical terms in A353710.

Original entry on oeis.org

1, 1, 1, 3, 8, 40, 3, 20, 10, 4, 95, 60, 77, 227, 498, 162, 438, 988, 334, 946, 1342, 13633, 1446, 810, 103, 140, 7033, 2518, 2369, 5096, 1719, 300, 2397, 14590, 434, 6539, 26193, 20403, 13857, 10, 26972, 24908, 44745, 3346, 149938, 5859, 29919, 132184, 123679
Offset: 1

Views

Author

N. J. A. Sloane, May 09 2022

Keywords

Examples

			The first 60 terms of A353710 are 0, / 1, / 2, / 3, 3, 3, / 5, 5, 5, 5, 5, 5, 5, 5, / 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, / 11, 11, 11, / 15, 15, 15, ... The slashes indicate the initial runs of lengths 1, 1, 1, 3, 8, 40, 3, ...
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A353718_gen(): # generator of terms
        s, a, b, c, ab, k = {0,1}, 0, 1, 2, 1, 1
        yield from (1,1)
        while True:
            for n in count(c):
                if not (n & ab or n in s):
                    a, b = b, n
                    ab = a|b
                    s.add(n)
                    if c in s:
                        yield k
                        k = 0
                        while c in s:
                            c += 1
                    k += 1
                    break
    A353718_list = list(islice(A353718_gen(),20)) # Chai Wah Wu, May 10 2022

Extensions

More terms from Rémy Sigrist, May 09 2022

A353722 Records in A353717.

Original entry on oeis.org

0, 1, 2, 5, 13, 53, 56, 76, 86, 90, 185, 245, 322, 549, 1047, 1209, 1647, 2635, 2969, 3915, 5257, 18890, 20336, 21146, 21249, 21389, 28422, 30940, 33309, 38405, 40124, 40424, 42821, 57411, 57845, 64384, 90577, 110980, 124837, 124847, 151819, 176727, 221472, 224818, 374756, 380615, 410534, 542718, 666397, 768871, 792936, 792939, 797670, 1004869, 1094200
Offset: 1

Views

Author

N. J. A. Sloane, May 10 2022

Keywords

Comments

These are the indices of the terms of A353709 that are the slowest to appear (cf. A353723).

Crossrefs

A353723 Indices of records in A353717.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 11, 15, 23, 27, 29, 31, 39, 47, 55, 61, 63, 95, 111, 123, 127, 191, 255, 431, 443, 447, 495, 511, 639, 703, 759, 763, 767, 879, 895, 943, 959, 1007, 1023, 1727, 1775, 1791, 1919, 2015, 2047, 2559, 3007, 3063, 3071, 3583, 3839, 3967, 4031, 4063, 4079, 4095, 6111, 6127, 6143, 7135, 7165, 7167, 7671, 7679, 7935, 8063, 8183, 8191, 11775, 11999, 12031
Offset: 1

Views

Author

Rémy Sigrist and N. J. A. Sloane, May 10 2022

Keywords

Comments

These are the numbers that are the slowest to appear in A353709.
Also distinct values of A353710; a(n) appears A353718(n) times in A353710.

Crossrefs

A353727 Index in A353715 of the first term divisible by 2^n and no higher power of 2, or -1 if no such term exists.

Original entry on oeis.org

0, 2, 3, 11, 54, 74, 88, 183, 20334, 30938, 21247, 90575, 3913, 124845, 2643790, 5828721, 2469947, 4005550, 19917707
Offset: 0

Views

Author

Walter Trump, May 11 2022

Keywords

Examples

			Table showing initial values of n (column 1) and a(n) (column 3).
The central column shows the corresponding entry of A353715 written in base 2.
The entries in column 2 end in exactly n zeros.
   n                    A353715(a(n))       a(n)
   0                                1         0
   1                              110         2
   2                             1100         3
   3                          1101000        11
   4                         11110000        54
   5                       1111100000        74
   6                      11101000000        88
   7                     110110000000       183
   8              1111110101100000000     20334
   9             10111110101000000000     30938
  10              1111111110000000000     21247
  11           1001111111100000000000     90575
  12                11111000000000000      3913
  13          10011111110000000000000    124845
  14      111110111110100000000000000   2643790
  15    10011111111111000000000000000   5828721
  16      111111111110000000000000000   2469947
  17     1111111101100000000000000000   4005550
  18  1011111111111000000000000000000  19917707
		

Crossrefs

Previous Showing 11-20 of 20 results.