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 201 results. Next

A364258 a(n) = A163511(n) - n.

Original entry on oeis.org

1, 1, 2, 0, 4, 4, 0, -2, 8, 18, 8, 14, 0, 2, -4, -8, 16, 64, 36, 106, 16, 54, 28, 26, 0, 20, 4, 8, -8, -8, -16, -20, 32, 210, 128, 590, 72, 338, 212, 304, 32, 184, 108, 202, 56, 102, 52, 74, 0, 86, 40, 124, 8, 52, 16, 22, -16, 6, -16, -4, -32, -28, -40, -50, 64, 664, 420, 3058, 256, 1806, 1180, 2330, 144, 1052, 676
Offset: 0

Views

Author

Antti Karttunen, Jul 25 2023

Keywords

Comments

Compare also to the scatter plot of A364294.

Crossrefs

Cf. A007283, A163511, A364255 [= gcd(n,a(n))], A364287 (positions of negative terms), A364292 (of terms <= 0), A364288, A364294 [= -a(A364293(n))].

Programs

  • Mathematica
    f[n_] := Reverse@ Map[Ceiling[(Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]]; {1}~Join~Table[-n + Function[t, Prime[t] Product[Prime[m]^(f[n][[m]]), {m, t}] ][DigitCount[n, 2, 1]], {n, 120}] (* Michael De Vlieger, Jul 25 2023 *)
  • Python
    from sympy import nextprime
    def A364258(n):
        c, p, k = 1, 1, n
        while k:
            c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())
            k >>= s+1
        return c*p-n # Chai Wah Wu, Jul 25 2023

Formula

a(n) = A364288(A163511(n)).
For n >= 1, a(2*n) = 2*a(n).
For n >= 0, a(A007283(n)) = 0.

A365805 a(n) = largest exponent m for which a representation of the form A163511(n) = k^m exists (for some k). a(0) = 0 by convention.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 01 2023

Keywords

Comments

Equivalently, the largest exponent m for which a representation of the form A332214(n) = k^m exists (for some k), or similarly, for any other such variant of A163511, like A332817.

Crossrefs

Cf. A365808 (positions of even terms), A365801 (multiples of 3), A365802 (multiples of 5), A366287 (multiples of 7), A366391 (multiples of 11).

Programs

  • PARI
    A052409(n) = { my(k=ispower(n)); if(k, k, n>1); };
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A365805(n) = A052409(A163511(n));

Formula

a(n) = A052409(A163511(n)).
If a(n) > 1 (or A052409(n) > 1), then a(n) <> A052409(n). [Consider A366370]

A323901 a(n) = A002487(A163511(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 2, 3, 1, 8, 4, 7, 2, 4, 3, 3, 1, 14, 8, 11, 4, 18, 7, 9, 2, 12, 4, 9, 3, 8, 3, 5, 1, 22, 14, 43, 8, 34, 11, 47, 4, 16, 18, 23, 7, 26, 9, 13, 2, 16, 12, 23, 4, 18, 9, 17, 3, 6, 8, 11, 3, 6, 5, 5, 1, 64, 22, 127, 14, 112, 43, 97, 8, 84, 34, 121, 11, 26, 47, 111, 4, 66, 16, 89, 18, 40, 23, 57, 7, 36, 26, 57, 9, 50, 13, 29, 2, 50
Offset: 0

Views

Author

Antti Karttunen, Feb 09 2019

Keywords

Crossrefs

Cf. also A323902, A323903.

Programs

Formula

a(n) = A002487(A163511(n)).
a(2^n) = 1 for all n >= 0.

A365808 Numbers k such that A163511(k) is a square.

Original entry on oeis.org

0, 2, 5, 8, 11, 17, 20, 23, 32, 35, 41, 44, 47, 65, 68, 71, 80, 83, 89, 92, 95, 128, 131, 137, 140, 143, 161, 164, 167, 176, 179, 185, 188, 191, 257, 260, 263, 272, 275, 281, 284, 287, 320, 323, 329, 332, 335, 353, 356, 359, 368, 371, 377, 380, 383, 512, 515, 521, 524, 527, 545, 548, 551, 560, 563, 569, 572, 575
Offset: 1

Views

Author

Antti Karttunen, Oct 01 2023

Keywords

Comments

The sequence is defined inductively as:
(a) it contains 0 and 2,
and
(b) for any nonzero term a(n), (2*a(n)) + 1 and 4*a(n) are also included as terms.
Because the inductive definition guarantees that all terms after 0 are of the form 3k+2 (A016789), and because for any n >= 0, n^2 == 0 or 1 (mod 3), (i.e., squares are in A032766), it follows that there are no squares in this sequence after the initial 0.

Crossrefs

Cf. A000290, A010052, A032766, A163511, A365807 (characteristic function).
Positions of even terms in A365805.
Sequence A243071(n^2), n >= 1, sorted into ascending order.
Subsequences: A004171, A055010, A365809 (odd terms).
Subsequence of A016789 (after the initial 0).

Programs

  • PARI
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    isA365808v2(n) = issquare(A163511(n));
    
  • PARI
    isA365808(n) = if(n<=2, !(n%2), if(n%2, isA365808((n-1)/2), if(n%4, 0, isA365808(n/4))));
    
  • Python
    from itertools import count, islice
    def A365808_gen(): # generator of terms
        return map(lambda n:(3*(n+1)>>2)-1,filter(lambda n:n==1 or (n&3==3 and not '00' in bin(n)),count(1)))
    A365808_list = list(islice(A365808_gen(),20)) # Chai Wah Wu, Feb 12 2025

A252737 Row sums of irregular tables A005940, A163511, and A332977.

Original entry on oeis.org

1, 2, 7, 28, 130, 702, 4384, 31516, 260068, 2445372, 25796360, 299286550, 3751803964, 50211590696, 712746859372, 10697637496288, 169490803535680, 2830925427778810, 49785906936838240, 921273098388684878, 17944637546960083042, 368472898102440537484, 7993616254370783660414, 183539682466936703629744
Offset: 0

Views

Author

Antti Karttunen, Dec 21 2014

Keywords

Crossrefs

Row sums of tables A005940, A163511, and A332977.
Cf. A252738 (row products).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-`if`(
          i=0, j, 1), j)*ithprime(j), j=1..`if`(i=0, n, i)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..23);  # Alois P. Heinz, Mar 04 2020
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - If[i == 0, j, 1], j]* Prime[j], {j, 1, If[i == 0, n, i]}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jan 03 2022, after Alois P. Heinz *)
  • PARI
    allocatemem(234567890);
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A252737print(up_to_n) = { my(s, i=0, n=0); for(n=0, up_to_n, if(0 == n, s = 1, if(1 == n, s = 2; lev = vector(1); lev[1] = 2, oldlev = lev; lev = vector(2*length(oldlev)); s = 0; for(i = 0, (2^(n-1))-1, lev[i+1] = if((i%2),A003961(oldlev[(i\2)+1]),2*oldlev[(i\2)+1]); s += lev[i+1]))); write("b252737.txt", n, " ", s)); };
    A252737print(23); \\ Terms a(0) .. a(23) were computed with this program.
    
  • Scheme
    (define (A252737 n) (if (zero? n) 1 (add A163511 (A000079 (- n 1)) (A000225 n))))
    
  • Scheme
    (define (A252737 n) (if (zero? n) 1 (add (COMPOSE A005940 1+) (A000079 (- n 1)) (A000225 n))))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))
    (define (COMPOSE . funlist) (cond ((null? funlist) (lambda (x) x)) (else (lambda (x) ((car funlist) ((apply COMPOSE (cdr funlist)) x))))))

Formula

a(0) = 1; for n>1: a(n) = Sum_{k = A000079(n-1) .. A000225(n)} A163511(k) = Sum_{k = 2^(n-1) .. (2^n)-1} A163511(k).

A324184 a(n) = sigma(A163511(n)).

Original entry on oeis.org

1, 3, 7, 4, 15, 13, 12, 6, 31, 40, 39, 31, 28, 24, 18, 8, 63, 121, 120, 156, 91, 124, 93, 57, 60, 78, 72, 48, 42, 32, 24, 12, 127, 364, 363, 781, 280, 624, 468, 400, 195, 403, 372, 342, 217, 228, 171, 133, 124, 240, 234, 248, 168, 192, 144, 96, 90, 104, 96, 72, 56, 48, 36, 14, 255, 1093, 1092, 3906, 847, 3124, 2343, 2801, 600
Offset: 0

Views

Author

Antti Karttunen, Feb 17 2019

Keywords

Crossrefs

Programs

  • PARI
    A324184(n) = if(!n,1,my(p=2,mp=p*p,m=1); while(n>1, if(n%2, p=nextprime(1+p); mp = p*p, if((2==n)||!(n%4),mp *= p,m *= (mp-1)/(p-1))); n >>= 1); (m*(mp-1)/(p-1)));
    
  • PARI
    A163511(n) = if(!n,1,my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(p+1)); n >>= 1); (t*p));
    A324184(n) = sigma(A163511(n));
    
  • Python
    from sympy import nextprime
    def A324184(n):
        if n:
            c, p = 1, 1
            while n:
                c *= ((p:=nextprime(p))**(s:=(~n&n-1).bit_length()+1)-1)//(p-1)
                n >>= s
            return c*(p**(s+1)-1)//(p**s-1)
        return 1 # Chai Wah Wu, Jul 25 2023

Formula

a(n) = A000203(A163511(n)).
For n >= 1, a(n) = A324054(A054429(n)).

A324185 Deficiency of n permuted by A163511: a(n) = A033879(A163511(n)) = 2*A163511(n) - sigma(A163511(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 5, 0, 4, 1, 14, -3, 19, -4, 6, 2, 6, 1, 41, -12, 94, -19, 26, 7, 41, -12, 12, -12, 22, -2, 10, 4, 10, 1, 122, -39, 469, -64, 126, 32, 286, -51, 47, -72, 148, -17, 66, 25, 109, -28, 30, -54, 102, -48, 18, -4, 58, -10, 22, -12, 38, 0, 18, 8, 12, 1, 365, -120, 2344, -199, 626, 157, 2001, -168, 222, -372, 1030, -92, 458, 172, 1198
Offset: 0

Views

Author

Antti Karttunen, Feb 17 2019

Keywords

Comments

If there are no odd perfect numbers, then all n for which a(n) is 0 are given by sequence A324200.

Crossrefs

Programs

  • PARI
    A163511(n) = if(!n,1,my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A033879(n) = (2*n-sigma(n));
    A324185(n) = A033879(A163511(n));
    
  • PARI
    A324184(n) = if(!n,1,my(p=2,mp=p*p,m=1); while(n>1, if(n%2, p=nextprime(1+p); mp = p*p, if((2==n)||!(n%4),mp *= p,m *= (mp-1)/(p-1))); n >>= 1); (m*(mp-1)/(p-1)));
    A324185(n) = (2*A163511(n)) - A324184(n);

Formula

a(n) = A033879(A163511(n)) = 2*A163511(n) - A324184(n) = 2*A163511(n) - A000203(A163511(n)).
For n > 0, a(n) = A324055(A054429(n)).

A324186 Sum of odd divisors permuted by A163511: a(n) = A000593(A163511(n)).

Original entry on oeis.org

1, 1, 1, 4, 1, 13, 4, 6, 1, 40, 13, 31, 4, 24, 6, 8, 1, 121, 40, 156, 13, 124, 31, 57, 4, 78, 24, 48, 6, 32, 8, 12, 1, 364, 121, 781, 40, 624, 156, 400, 13, 403, 124, 342, 31, 228, 57, 133, 4, 240, 78, 248, 24, 192, 48, 96, 6, 104, 32, 72, 8, 48, 12, 14, 1, 1093, 364, 3906, 121, 3124, 781, 2801, 40, 2028, 624, 2400, 156, 1600, 400, 1464, 13, 1240, 403
Offset: 0

Views

Author

Antti Karttunen, Feb 17 2019

Keywords

Crossrefs

Programs

Formula

a(n) = A000593(A163511(n)).
For n > 0, a(n) = A324056(A054429(n)).

A286531 Restricted growth sequence of A278531 (prime-signature of A163511).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 17 2017

Keywords

Crossrefs

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 }; \\ 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));
    A054429(n) = ((3<<#binary(n\2))-n-1); \\ After M. F. Hasler, Aug 18 2014
    A278531(n) = if(!n,1,A278222(A054429(n)));
    write_to_bfile(0,rgs_transform(vector(65538,n,A278531(n-1))),"b286531.txt");

A364492 a(n) = A163511(n) / gcd(n, A163511(n)).

Original entry on oeis.org

1, 2, 2, 1, 2, 9, 1, 5, 2, 3, 9, 25, 1, 15, 5, 7, 2, 81, 3, 125, 9, 25, 25, 49, 1, 9, 15, 35, 5, 21, 7, 11, 2, 81, 81, 125, 3, 375, 125, 343, 9, 225, 25, 245, 25, 49, 49, 121, 1, 135, 9, 175, 15, 105, 35, 7, 5, 21, 21, 55, 7, 33, 11, 13, 2, 729, 81, 3125, 81, 625, 125, 2401, 3, 1125, 375, 343, 125, 147, 343, 1331
Offset: 0

Views

Author

Antti Karttunen, Jul 26 2023

Keywords

Comments

Denominator of n / A163511(n).

Crossrefs

Cf. A163511, A364255, A364491 (numerators), A364493, A364496 (positions of 1's).

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A054429(n) = ((3<<#binary(n\2))-n-1);
    A163511(n) = if(!n,1,A005940(1+A054429(n)))
    A364492(n) = { my(u=A163511(n)); (u/gcd(n, u)); };
    
  • Python
    from math import gcd
    from sympy import nextprime
    def A364492(n):
        c, p, k = 1, 1, n
        while k:
            c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())
            k >>= s+1
        return c*p//gcd(c*p,n) # Chai Wah Wu, Jul 26 2023

Formula

a(n) = A163511(n) / A364255(n) = A163511(n) / gcd(n, A163511(n)).
Previous Showing 11-20 of 201 results. Next