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 51-60 of 112 results. Next

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A006530(n), A278222(n)].
For all i, j >= 1: A324400(i) = A324400(j) => a(i) = a(j).

Crossrefs

Differs from A351454 and A351460 for the first time at n=49, where a(49) = 19, while A351454(49) = A351460(49) = 26.

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; };
    A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
    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));
    Aux351452(n) = [A006530(n), A278222(n)];
    v351452 = rgs_transform(vector(up_to, n, Aux351452(n)));
    A351452(n) = v351452[n];

A351578 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(f(i)) = A007814(f(j)) and A278222(f(i)) = A278222(f(j)), for all i, j >= 1, where f(k) = A109812(k).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 07 2022

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A007814(A109812(n)), A046523(A005940(1+A109812(n)))].
The sequence allots a new distinct number for each newly encountered combination of the 2-adic valuation of A109812 (A351964), and the multiset of the lengths of 1-runs in the odd part of A109812 (A351965). See the examples.
For all i, j: a(i) = a(j) => A352889(i) = A352889(j).

Examples

			   n   A109812(n)  [base-2]   A351964(n)           Lengths of       a(n)
                              (# of trailing 0's)  1-runs       (allotted #)
-----+----------------------------------------------------------------------
   1 :          1       [1],  0                    [1]               1
   2 :          2      [10],  1                    [1]               2
   3 :          4     [100],  2                    [1]               3
   4 :          3      [11],  0                    [2]               4
   5 :          8    [1000],  3                    [1]               5
   6 :          5     [101],  0                    [1,1]             6
   7 :         10    [1010],  1                    [1,1]             7
   8 :         16   [10000],  4                    [1]               8
   9 :          6     [110],  1                    [2]               9
  10 :          9    [1001],  0                    [1,1]             6
  11 :         18   [10010],  1                    [1,1]             7
Because the combinations of the multiset of 1-runs in the binary expansion of A109812(n) and the number of trailing zeros in it (A351964) are unique for n = 1 .. 9, a unique increasing number (starting from 1) is allotted for each, and a(n) = n for n <= 9. On the other hand, at n=10, the binary expansion is [1001], for which these two measures are equal to that of binary expansion [101] found first time at n=6, therefore the rgs-transform allots for 10 the same number as for 6, and a(10) = a(6) = 6. At n=11, the binary expansion is [10010], where these two measures coincide with that of [1010] found first time at n=7, therefore a(10) = a(7) = 7.
		

Crossrefs

Programs

  • PARI
    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; };
    v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } '
    up_to = #v109812;
    A109812(n) = v109812[n];
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A007814(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
    v351578 = rgs_transform(vector(up_to, n, [A007814(A109812(n)), A046523(A005940(1+A109812(n)))]));
    A351578(n) = v351578[n];

A286379 Compound filter ("discard the smallest prime factor" & "signature for 1-runs in base-2"): a(n) = P(A032742(n), A278222(n)), where P(n,k) is sequence A000027 used as a pairing function, with a(1) = 1.

Original entry on oeis.org

1, 2, 7, 5, 16, 18, 29, 14, 31, 50, 67, 42, 67, 98, 195, 44, 16, 100, 67, 115, 637, 242, 277, 117, 125, 289, 955, 224, 277, 450, 497, 152, 131, 248, 160, 271, 436, 454, 643, 320, 436, 1246, 1771, 550, 2716, 1058, 1129, 375, 160, 655, 1343, 692, 1771, 1918, 3332, 623, 880, 1355, 2557, 1020, 1129, 1922, 3507, 560, 166, 736, 67, 775, 1349, 1070, 277, 856, 436
Offset: 1

Views

Author

Antti Karttunen, May 13 2017

Keywords

Crossrefs

Programs

  • PARI
    A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A278222(n) = A046523(A005940(1+n));
    A286379(n) = if(1==n,n,(1/2)*(2 + ((A032742(n)+A278222(n))^2) - A032742(n) - 3*A278222(n)));
    for(n=1, 16384, write("b286379.txt", n, " ", A286379(n)));
    
  • Python
    from sympy import factorint, divisors
    import math
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a278222(n): return a046523(a005940(n + 1))
    def a(n): return 1 if n==1 else T(divisors(n)[-2], a278222(n)) # Indranil Ghosh, May 13 2017
  • Scheme
    (define (A286379 n) (if (= 1 n) n (* (/ 1 2) (+ (expt (+ (A032742 n) (A278222 n)) 2) (- (A032742 n)) (- (* 3 (A278222 n))) 2))))
    

Formula

a(1) = 1, for n > 1, a(n) = (1/2)*(2 + ((A032742(n)+A278222(n))^2) - A032742(n) - 3*A278222(n)).

A286536 a(n) = A278222(A276445(n)).

Original entry on oeis.org

2, 4, 2, 4, 8, 2, 6, 4, 12, 8, 2, 16, 12, 6, 6, 4, 12, 12, 8, 2, 36, 32, 12, 24, 12, 6, 16, 30, 24, 6, 6, 4, 12, 12, 12, 8, 2, 36, 72, 32, 12, 60, 72, 12, 24, 12, 6, 36, 48, 30, 64, 48, 60, 24, 30, 24, 6, 16, 30, 60, 24, 6, 6, 4, 12, 12, 12, 12, 8, 2, 36, 72, 72, 32, 12, 60, 180, 72, 12, 60, 72, 12, 24, 12, 6, 36
Offset: 1

Views

Author

Antti Karttunen, May 17 2017

Keywords

Crossrefs

Cf. A286537 (rgs-version of this sequence).

Programs

Formula

a(n) = A278222(A276445(n)).
a(n) = A278219(A267111(n)).

A286596 a(n) = A278222(A153141(n)).

Original entry on oeis.org

1, 2, 4, 2, 8, 4, 2, 6, 16, 8, 4, 12, 2, 6, 6, 12, 32, 16, 8, 24, 4, 12, 12, 36, 2, 6, 6, 12, 6, 30, 12, 24, 64, 32, 16, 48, 8, 24, 24, 72, 4, 12, 12, 36, 12, 60, 36, 72, 2, 6, 6, 12, 6, 30, 12, 24, 6, 30, 30, 60, 12, 60, 24, 48, 128, 64, 32, 96, 16, 48, 48, 144, 8, 24, 24, 72, 24, 120, 72, 216, 4, 12, 12, 36, 12, 60, 36, 72, 12
Offset: 0

Views

Author

Antti Karttunen, Jun 04 2017

Keywords

Crossrefs

Cf. A153141, A278222, A286597 (rgs-version of this sequence), A286598.

Programs

Formula

a(n) = A278222(A153141(n)).

A286598 a(n) = A278222(A153142(n)).

Original entry on oeis.org

1, 2, 4, 2, 4, 8, 6, 2, 4, 12, 8, 16, 6, 12, 6, 2, 4, 12, 12, 36, 8, 24, 16, 32, 6, 30, 12, 24, 6, 12, 6, 2, 4, 12, 12, 36, 12, 60, 36, 72, 8, 24, 24, 72, 16, 48, 32, 64, 6, 30, 30, 60, 12, 60, 24, 48, 6, 30, 12, 24, 6, 12, 6, 2, 4, 12, 12, 36, 12, 60, 36, 72, 12, 60, 60, 180, 36, 180, 72, 144, 8, 24, 24, 72, 24, 120, 72, 216, 16, 48, 48
Offset: 0

Views

Author

Antti Karttunen, Jun 04 2017

Keywords

Crossrefs

Cf. A153142, A278222, A286596, A286599 (rgs-version of this sequence).

Programs

Formula

a(n) = A278222(A153142(n)).

A302795 Restricted growth sequence transform of A278222(A302793(n)).

Original entry on oeis.org

1, 2, 3, 4, 2, 3, 2, 5, 6, 4, 2, 7, 4, 7, 4, 3, 5, 4, 2, 7, 4, 8, 9, 6, 7, 7, 10, 3, 7, 10, 5, 11, 9, 9, 2, 7, 4, 8, 12, 4, 7, 8, 12, 13, 8, 9, 7, 14, 4, 7, 10, 3, 7, 6, 7, 15, 12, 9, 5, 15, 4, 14, 16, 9, 11, 4, 2, 7, 12, 8, 9, 4, 7, 8, 9, 4, 8, 10, 7, 14, 12, 8, 12, 12, 8, 12, 8, 17, 4, 18, 7, 19, 12, 17, 4, 9, 14, 7, 12, 3, 7, 10, 7, 15, 12, 12
Offset: 0

Views

Author

Antti Karttunen, Apr 26 2018

Keywords

Crossrefs

Cf. also A286602, A286622 (compare the scatter-plots).

Programs

  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ After code in A005940
    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));
    A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) }; \\ From A193231
    A302793(n) = if(!n,n,A193231(1+A193231(n-1)));
    write_to_bfile(0,rgs_transform(vector(65538,n,A278222(A302793(n-1)))),"b302795.txt");

A304097 Restricted growth sequence transform of A278222(A302853(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 17 2018

Keywords

Crossrefs

Compare also the scatter-plot to that of A304535.

Programs

  • PARI
    \\ Needs also code from A282291 and A302853:
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    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 };
    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));
    write_to_bfile(0,rgs_transform(vector(60823,n,A278222(A302853(n-1)))),"b304097.txt");

A304737 Restricted growth sequence transform of A278222(A064413(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 18 2018

Keywords

Comments

Sequence allots a distinct value for each distinct multiset formed from the lengths of 1-runs in the binary representation of A064413(n), the n-th term of EKG-sequence. Compare to the scatter plot of A286622.

Crossrefs

Programs

  • PARI
    \\ Needs also code for A064413.
    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 };
    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));
    v304737 = rgs_transform(vector(65539,n,A278222(A064413(n))));
    A304737(n) = v304737[n];

A318831 Restricted growth sequence transform of A278222(A000010(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 04 2018

Keywords

Comments

Sequence allots a distinct value for each distinct multiset formed from the lengths of 1-runs in the binary expansion of A000010(n).
For all i, j: a(i) = a(j) => A295660(i) = A295660(j).

Crossrefs

Compare also with the scatterplots of A286622, A304101 and A318832.

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 };
    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));
    v318831 = rgs_transform(vector(up_to,n,A278222(eulerphi(n))));
    A318831(n) = v318831[n];
Previous Showing 51-60 of 112 results. Next