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 61-70 of 154 results. Next

A336390 Lexicographically earliest infinite sequence such that a(i) = a(j) => A336467(i) = A336467(j) and A336158(i) = A336158(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 2, 1, 4, 3, 3, 2, 5, 2, 6, 1, 7, 4, 8, 3, 9, 3, 3, 2, 10, 5, 11, 2, 12, 6, 2, 1, 6, 7, 6, 4, 13, 8, 14, 3, 15, 9, 16, 3, 17, 3, 3, 2, 4, 10, 18, 5, 19, 11, 18, 2, 20, 12, 12, 6, 21, 2, 22, 1, 23, 6, 24, 7, 6, 6, 7, 4, 25, 13, 26, 8, 6, 14, 8, 3, 27, 15, 15, 9, 28, 16, 29, 3, 30, 17, 14, 3, 9, 3, 29, 2, 31, 4, 17, 10, 32, 18, 33, 5, 34
Offset: 1

Views

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A336467(n), A336158(n)].
For all i, j:
A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j),
a(i) = a(j) => A331410(i) = A331410(j),
a(i) = a(j) => A336391(i) = A336391(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A000265(n) = (n>>valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A336158(n) = A046523(A000265(n));
    A336467(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]+1))^f[k,2])); };
    Aux336390(n) = [A336158(n), A336467(n)];
    v336390 = rgs_transform(vector(up_to, n, Aux336390(n)));
    A336390(n) = v336390[n];

A110766 Fractalization of Pi.

Original entry on oeis.org

3, 3, 1, 3, 4, 1, 1, 3, 5, 4, 9, 1, 2, 1, 6, 3, 5, 5, 3, 4, 5, 9, 8, 1, 9, 2, 7, 1, 9, 6, 3, 3, 2, 5, 3, 5, 8, 3, 4, 4, 6, 5, 2, 9, 6, 8, 4, 1, 3, 9, 3, 2, 8, 7, 3, 1, 2, 9, 7, 6, 9, 3, 5, 3, 0, 2, 2, 5, 8, 3, 8, 5, 4, 8, 1, 3, 9, 4, 7, 4, 1, 6, 6, 5, 9
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 15 2005

Keywords

Comments

Self-descriptive sequence: even terms are the sequence itself, odd terms are the digits of the decimal expansion of Pi.

Crossrefs

Cf. A000796 (Pi), A003602.
Cf. A110779 (of e), A110812 (of sqrt 2), A382130 (of phi).

Programs

  • Haskell
    import Data.List (transpose)
    a110766 n = a110766_list !! (n-1)
    a110766_list = concat $ transpose [a000796_list, a110766_list]
    -- Reinhard Zumkeller, Aug 29 2014

Formula

a(2n) = a(n); a(2n-1) = digits of Pi.

Extensions

a(85) corrected and formula fixed by Reinhard Zumkeller, Aug 29 2014

A117303 Self-inverse permutation of the natural numbers based on the bijection (2*x-1)*2^(y-1) <--> (2*y-1)*2^(x-1).

Original entry on oeis.org

1, 3, 2, 5, 4, 6, 8, 7, 16, 12, 32, 10, 64, 24, 128, 9, 256, 48, 512, 20, 1024, 96, 2048, 14, 4096, 192, 8192, 40, 16384, 384, 32768, 11, 65536, 768, 131072, 80, 262144, 1536, 524288, 28, 1048576, 3072, 2097152, 160, 4194304, 6144, 8388608, 18, 16777216
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 24 2006

Keywords

Comments

a(a(n)) = n; fixed points A014480: a(A014480(n)) = A014480(n). - Reinhard Zumkeller, Apr 27 2006

Crossrefs

Programs

  • Maple
    a:= n-> (j-> (2*j+1)*2^((n/2^j-1)/2))(padic[ordp](n, 2)):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jan 23 2019
  • Mathematica
    a[n_] := (2 IntegerExponent[2 n, 2] - 1)*2^((n/2^IntegerExponent[n, 2] + 1)/2 - 1); Array[a, 50] (* Jean-François Alcover, Mar 12 2019 *)
  • Python
    def A117303(n): return (((m:=(n&-n).bit_length())<<1)-1)*(1<<(n>>m)) # Chai Wah Wu, Jul 14 2022

Formula

a(n) = (2*A001511(n) - 1) * 2^(A003602(n) - 1).

Extensions

Spelling corrected by Jason G. Wurtzel, Aug 23 2010

A330896 Lexicographically earliest sequence of positive integers such that for any m > 0, gaps between consecutive m's are all distinct.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 3, 2, 3, 1, 4, 2, 3, 3, 1, 4, 2, 4, 3, 5, 1, 3, 2, 4, 4, 5, 5, 1, 3, 2, 5, 4, 5, 6, 3, 1, 6, 2, 6, 4, 5, 7, 3, 4, 1, 5, 2, 6, 5, 7, 7, 3, 4, 6, 1, 4, 2, 5, 6, 6, 7, 3, 7, 6, 5, 1, 4, 2, 7, 8, 6, 7, 3, 8, 5, 7, 4, 1, 6, 2, 7, 8, 8, 9, 3, 5
Offset: 1

Views

Author

Rémy Sigrist, May 01 2020

Keywords

Comments

Every positive integer appears infinitely many times in the sequence.
This sequence has similarities with A003602, where gaps between consecutive equal values are all distinct.
This sequence has similarities with A002260, where for any m > 0, gaps between consecutive m's are strictly increasing.
Apparently, for any m > 0:
- the k-th gap between consecutive m's equals k except for finitely many k's,
- the k-th occurrence of m appears at index A330897(m) + A000217(k-1) except for finitely many k's.

Examples

			The first terms, alongside the gaps for m = 1..4, are:
     n|  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  ...
  a(n)|  1  1  2  1  2  2  1  3  2  3  1  4  2  3  3  1  4  2  4  3  5  1  3  ...
  ----+---------------------------------------------------------------------
   1's|     1,    2,       3,          4,             5,                6,    ...
   2's|              2, 1,       3,          4,             5,                ...
   3's|                             2,          4, 1,             5,       3, ...
   4's|                                                  5,    2,             ...
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
    
  • Python
    from itertools import islice
    def agen(): # generator of terms
        m, a = dict(), []
        while True:
            an, allnew = 0, False
            while not allnew:
                allnew, an, mn = True, an+1, set()
                for i in range(len(a)-1, -1, -1):
                    if an == a[i]:
                        t = len(a)-i+1
                        if (an in m and t in m[an]) or t in mn: allnew = False; break
                        mn.add(t)
                        break
            yield an; a.append(an)
            if an not in m: m[an] = set()
            m[an] |= mn
    print(list(islice(agen(), 87))) # Michael S. Branicky, Dec 06 2024

Formula

a(n) = 1 iff n belongs to A000124.

A336159 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A336158(i) = A336158(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 6, 4, 7, 1, 3, 5, 6, 3, 8, 6, 9, 2, 10, 6, 11, 4, 9, 7, 12, 1, 13, 3, 14, 5, 15, 6, 16, 3, 15, 8, 17, 6, 18, 9, 19, 2, 10, 10, 20, 6, 17, 11, 21, 4, 16, 9, 22, 7, 19, 12, 23, 1, 13, 13, 6, 3, 8, 14, 9, 5, 15, 15, 18, 6, 24, 16, 19, 3, 25, 15, 17, 8, 26, 17, 27, 6, 17, 18, 28, 9, 27, 19, 29, 2, 6, 10, 30, 10, 17, 20, 22, 6, 31
Offset: 1

Views

Author

Antti Karttunen, Jul 11 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A278222(n), A336158(n)], i.e., of the ordered pair [A046523(A005940(1+n)), A046523(A000265(n))].
For all i, j: A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A000265(n) = (n>>valuation(n,2));
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    A336158(n) = A046523(A000265(n));
    Aux336159(n) = [A278222(n), A336158(n)];
    v336159 = rgs_transform(vector(up_to, n, Aux336159(n)));
    A336159(n) = v336159[n];

A337226 Lexicographically earliest sequence of positive integers with the property that, for all k > 0, there is at most one j such that a(j) = a(j+k).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 2, 5, 1, 6, 3, 7, 8, 9, 4, 10, 2, 11, 5, 12, 1, 13, 6, 14, 15, 3, 16, 7, 17, 18, 8, 19, 20, 21, 22, 9, 23, 4, 24, 10, 25, 2, 26, 11, 27, 5, 28, 12, 29, 1, 30, 13, 31, 6, 32, 33, 14, 34, 15, 35, 36, 3, 37, 16, 38, 39, 40, 7, 41, 42, 17, 43, 18, 44, 45, 8
Offset: 1

Views

Author

Samuel B. Reid, Aug 19 2020

Keywords

Comments

The sequence initially appears to be trivially fractal in that the removal of the first occurrence of each value seems to yield the original sequence. This pattern continues until a(121) where, if the sequence were fractal in this way, the value would be 72 or 1. The actual value is 13, so the pattern is broken.
Conjecture: For all k > 0, there is exactly one j such that a(j) = a(j+k). For 0 < k < 11911, this conjecture holds.

Examples

			  1 1 2 1 3 4 2
   (1)1 2 1 3 4   k = 1
      1(1)2 1 3   k = 2
       (1)1 2 1   k = 3
          1 1(2)  k = 4
            1 1   k = 5
              1   k = 6
Coincidences are circled. There can only be one coincidence per row.
a(3) cannot be 1 because that would result in two coincidences for k = 1.
a(5) cannot be 1 or 2 because those values would result in two coincidences for k = 1 and k = 2, respectively.
a(7) cannot be 1, 3, or 4 because those values would result in two coincidences for k = 3, k = 2, and k = 1, respectively. It can, however, be 2 because this results in no double coincidences.
		

Crossrefs

Programs

  • Python
    # See Links section.

A249725 Inverse permutation to A135764.

Original entry on oeis.org

1, 3, 2, 6, 4, 5, 7, 10, 11, 8, 16, 9, 22, 12, 29, 15, 37, 17, 46, 13, 56, 23, 67, 14, 79, 30, 92, 18, 106, 38, 121, 21, 137, 47, 154, 24, 172, 57, 191, 19, 211, 68, 232, 31, 254, 80, 277, 20, 301, 93, 326, 39, 352, 107, 379, 25, 407, 122, 436, 48, 466, 138, 497, 28, 529, 155, 562, 58, 596, 173, 631, 32, 667, 192, 704, 69, 742, 212, 781, 26, 821, 233, 862, 81
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2014

Keywords

Crossrefs

Inverse: A135764.
Similar or related permutations: A209268, A246276, A246676, A249742, A249811.

Programs

Formula

a(n) = 1 + (((A003602(n)+A007814(n))^2 + A007814(n) - A003602(n))/2).
As a composition of other permutations:
a(n) = A249742(A249811(n)).
a(n) = A246276(A246676(n)).
Other identities. For all n >= 0 the following holds:
a(A005408(n)) = A000124(n). [Maps odd numbers to central polygonal numbers].
a(A000079(n)) = A000217(n+1). [Maps powers of two to triangular numbers].

A336471 Lexicographically earliest infinite sequence such that a(i) = a(j) => A329697(i) = A329697(j) and A336158(i) = A336158(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 3, 2, 3, 3, 5, 1, 2, 4, 6, 2, 7, 3, 6, 2, 4, 3, 8, 3, 6, 5, 6, 1, 7, 2, 7, 4, 6, 6, 7, 2, 3, 7, 9, 3, 10, 6, 9, 2, 11, 4, 5, 3, 6, 8, 7, 3, 12, 6, 9, 5, 6, 6, 13, 1, 7, 7, 9, 2, 12, 7, 9, 4, 6, 6, 10, 6, 12, 7, 9, 2, 14, 3, 6, 7, 5, 9, 12, 3, 6, 10, 12, 6, 12, 9, 12, 2, 3, 11, 13, 4, 6, 5, 6, 3, 15
Offset: 1

Views

Author

Antti Karttunen, Jul 22 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A329697(n), A336158(n)].
For all i, j:
A336470(i) = A336470(j) => a(i) = a(j)
a(i) = a(j) => A336396(i) = A336396(j),
a(i) = a(j) => A336469(i) = A336469(j) => A336477(i) = A336477(j).
This sequence has an ability to see where the terms of A003401 are, as they are the indices of zeros in A336469. Specifically, they are numbers k that satisfy the condition A329697(k) = A001221(A336158(k)), i.e., numbers for which A329697(k) is equal to the number of distinct prime divisors of the odd part of k. See also comments in array A334100.

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A000265(n) = (n>>valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A336158(n) = A046523(A000265(n));
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    Aux336471(n) = [A329697(n), A336158(n)];
    v336471 = rgs_transform(vector(up_to, n, Aux336471(n)));
    A336471(n) = v336471[n];

A365431 Lexicographically earliest infinite sequence such that a(i) = a(j) => A364502(i) = A364502(j) for all i, j >= 1, where A364502(n) is the denominator of n / A005940(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 2, 2, 1, 6, 3, 7, 1, 8, 4, 9, 1, 10, 5, 5, 2, 11, 2, 12, 1, 13, 6, 14, 3, 15, 7, 7, 1, 16, 8, 17, 4, 18, 9, 19, 1, 20, 10, 10, 5, 21, 5, 9, 2, 22, 11, 23, 2, 24, 12, 25, 1, 26, 13, 27, 6, 28, 14, 29, 3, 30, 15, 6, 7, 5, 7, 31, 1, 32, 16, 33, 8, 16, 17, 17, 4, 34, 18, 35, 9, 36, 19, 12, 1
Offset: 1

Views

Author

Antti Karttunen, Sep 07 2023

Keywords

Comments

Restricted growth sequence transform of A364502, or equally, of A365432.
For all i, j: A003602(i) = A003602(j) => a(i) = a(j).
Compare to the scatter plots of A365393 and A365715.

Crossrefs

Cf. also A365393, A365715 (analogous sequence for Doudna variant D(3)).

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A364502(n) = { my(u=A005940(n)); (u / gcd(n, u)); };
    v365431 = rgs_transform(vector(up_to,n,A364502(n)));
    A365431(n) = v365431[n];

A110779 Fractalization of e.

Original entry on oeis.org

2, 2, 7, 2, 1, 7, 8, 2, 2, 1, 8, 7, 1, 8, 8, 2, 2, 2, 8, 1, 4, 8, 5, 7, 9, 1, 0, 8, 4, 8, 5, 2, 2, 2, 3, 2, 5, 8, 3, 1, 6, 4, 0, 8, 2, 5, 8, 7, 7, 9, 4, 1, 7, 0, 1, 8, 3, 4, 5, 8, 2, 5, 6, 2, 6, 2, 2, 2, 4, 3, 9, 2, 7, 5, 7, 8, 5, 3, 7, 1, 2, 6, 4, 4, 7, 0, 0, 8, 9, 2, 3, 5, 6, 8, 9, 7, 9, 7, 9, 9, 5, 4, 9, 1, 5
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 15 2005

Keywords

Comments

Self-descriptive sequence: even terms are the sequence itself, odd terms are the digits of the decimal expansion of e.

Crossrefs

Cf. A110766 (of Pi), A110812 (of sqrt 2), A382130 (of phi).

Formula

a(2n) = a(n); a(2n+1) = digits of e.
Previous Showing 61-70 of 154 results. Next