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.

A364255 a(n) = gcd(n, A163511(n)).

Original entry on oeis.org

1, 1, 2, 3, 4, 1, 6, 1, 8, 9, 2, 1, 12, 1, 2, 1, 16, 1, 18, 1, 4, 3, 2, 1, 24, 5, 2, 1, 4, 1, 2, 1, 32, 3, 2, 5, 36, 1, 2, 1, 8, 1, 6, 1, 4, 3, 2, 1, 48, 1, 10, 1, 4, 1, 2, 11, 8, 3, 2, 1, 4, 1, 2, 1, 64, 1, 6, 1, 4, 3, 10, 1, 72, 1, 2, 5, 4, 7, 2, 1, 16, 27, 2, 1, 12, 5, 2, 1, 8, 1, 6, 1, 4, 3, 2, 1, 96, 1, 2, 1, 20, 1, 2, 1, 8, 105
Offset: 0

Views

Author

Antti Karttunen, Jul 16 2023

Keywords

Crossrefs

Cf. A163511, A364257 (Dirichlet inverse), A364258, A364491, A364492, A364493.

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));
    A364255(n) = gcd(n, A163511(n)); \\ Antti Karttunen, Sep 01 2023
  • Python
    from math import gcd
    from sympy import nextprime
    def A364255(n):
        c, p, k = 1, 1, n
        while k:
            c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())
            k >>= s+1
        return gcd(c*p,n) # Chai Wah Wu, Jul 25 2023
    

Formula

From Antti Karttunen, Sep 01 2023: (Start)
a(n) = gcd(n, A364258(n)) = gcd(A163511(n), A364258(n)).
a(n) = n / A364491(n) = A163511(n)/ A364492(n).
(End)

A364499 a(n) = A005940(n) - n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 4, 0, 12, 4, 12, 0, -6, -4, 2, 0, 14, 8, 22, 0, 24, 24, 48, 8, 96, 24, 50, 0, -20, -12, -2, -8, 18, 4, 24, 0, 36, 28, 62, 16, 130, 44, 88, 0, 72, 48, 96, 48, 192, 96, 170, 16, 286, 192, 316, 48, 564, 100, 180, 0, -48, -40, -28, -24, -4, -4, 28, -16, 18, 36, 90, 8, 198, 48, 110, 0, 62
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Compare to the scatter plot of A364563.
From Antti Karttunen, Aug 11 2023: (Start)
Can be computed as a certain kind of bitmask transformation of A364568 (analogous to the inverse Möbius transform that is appropriate for A156552-encoding of n).
See A364572, A364573 (and also A364576) for n (apart from those in A029747) where a(n) comes relatively close to the X-axis.
(End)

Examples

			A005940(528577) = 528581, therefore a(528577) = 528581 - 528577 = 4. (See A364576).
A005940(2109697) = 2109629, therefore a(2109697) = 2109629 - 2109697 = -68.
		

Crossrefs

Cf. A005940, A364500 [= gcd(n,a(n))], A364559, A364572, A364573, A364576.
Cf. A029747 (known positions of 0's), A364540 (positions of terms < 0), A364541 (of terms <= 0), A364542 (of terms >= 0), A364563 [= -a(A364543(n))].
Cf. also A364258, A364568.

Programs

  • Mathematica
    nn = 81; Array[Set[a[#], #] &, 2]; Do[If[EvenQ[n], Set[a[n], 2 a[n/2]], Set[a[n], Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &, FactorInteger[a[(n + 1)/2]]]]], {n, 3, nn}]; Array[a[#] - # &, nn] (* Michael De Vlieger, Jul 28 2023 *)
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A364499(n) = (A005940(n)-n);
    
  • PARI
    A364499(n) = { my(m=1,p=2,x=0,z=1); n--; while(n, if(!(n%2), p=nextprime(1+p), x += m; z *= p); n>>=1; m <<=1); (z-x)-1; }; \\ Antti Karttunen, Aug 06 2023
    
  • Python
    from math import prod
    from itertools import accumulate
    from collections import Counter
    from sympy import prime
    def A364499(n): return prod(prime(len(a)+1)**b for a, b in Counter(accumulate(bin(n-1)[2:].split('1')[:0:-1])).items())-n # Chai Wah Wu, Aug 07 2023

Formula

a(n) = -A364559(A005940(n)).
For all n >= 1, a(2*n) = 2*a(n).
For all n >= 1, a(A029747(n)) = 0.

A364502 a(n) = A005940(n) / gcd(n, A005940(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 9, 1, 7, 1, 15, 1, 25, 9, 9, 1, 11, 7, 21, 1, 5, 15, 45, 1, 49, 25, 25, 9, 125, 9, 81, 1, 13, 11, 33, 7, 55, 21, 21, 1, 77, 5, 105, 15, 35, 45, 135, 1, 121, 49, 49, 25, 245, 25, 45, 9, 343, 125, 375, 9, 625, 81, 27, 1, 17, 13, 39, 11, 65, 33, 99, 7, 91, 55, 11, 21, 25, 21, 189, 1, 143, 77, 231, 5
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Denominator of n / A005940(n).

Crossrefs

Cf. A005940, A364500, A364501 (numerators), A364546 (positions of 1's).
Cf. also A364492.

Programs

  • Mathematica
    nn = 84; Array[Set[a[#], #] &, 2]; Do[If[EvenQ[n], Set[a[n], 2 a[n/2]], Set[a[n], Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &, FactorInteger[a[(n + 1)/2]]]]], {n, 3, nn}]; Array[a[#]/GCD[a[#], #] &, nn] (* Michael De Vlieger, Jul 28 2023 *)
  • PARI
    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)); };

A364501 a(n) = n / gcd(n, A005940(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 9, 1, 11, 1, 13, 7, 5, 1, 17, 9, 19, 1, 3, 11, 23, 1, 25, 13, 9, 7, 29, 5, 31, 1, 33, 17, 35, 9, 37, 19, 13, 1, 41, 3, 43, 11, 9, 23, 47, 1, 49, 25, 17, 13, 53, 9, 11, 7, 57, 29, 59, 5, 61, 31, 7, 1, 65, 33, 67, 17, 69, 35, 71, 9, 73, 37, 5, 19, 7, 13, 79, 1, 81, 41, 83, 3, 17, 43, 29, 11, 89
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Comments

Numerator of n / A005940(n).

Crossrefs

Cf. A005940, A364500, A364502 (denominators), A364544 (positions of 1's).
Cf. also A364491.

Programs

  • Mathematica
    nn = 89; Array[Set[a[#], #] &, 2]; Do[If[EvenQ[n], Set[a[n], 2 a[n/2]], Set[a[n], Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &, FactorInteger[a[(n + 1)/2]]]]], {n, 3, nn}]; Array[#/GCD[a[#], #] &, nn] (* Michael De Vlieger, Jul 28 2023 *)
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A364501(n) = (n / gcd(n, A005940(n)));
    
  • PARI
    A364501(n) = { my(orgn=n,p=2,rl=0,z=1); n--; while(n, if(!(n%2), p=nextprime(1+p), rl++; if(1==(n%4), z *= p^min(rl,valuation(orgn,p)); rl=0)); n>>=1); (orgn/z); };

A365463 a(n) = gcd(n, A356867(n)), where A356867 is Sycamore's Doudna variant D(3).

Original entry on oeis.org

1, 2, 3, 1, 1, 6, 1, 8, 9, 1, 1, 3, 1, 2, 3, 2, 1, 18, 1, 4, 3, 1, 1, 24, 25, 2, 27, 1, 1, 3, 1, 4, 3, 2, 7, 9, 1, 2, 3, 5, 1, 6, 1, 4, 9, 1, 1, 6, 1, 50, 3, 4, 1, 54, 11, 2, 3, 1, 1, 12, 1, 2, 9, 1, 5, 3, 1, 4, 3, 10, 1, 72, 1, 2, 75, 1, 1, 6, 1, 16, 81, 1, 1, 3, 5, 2, 3, 2, 1, 9, 91, 2, 3, 1, 5, 12, 1, 2, 9, 5, 1, 6, 1, 8, 21
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2023

Keywords

Crossrefs

Cf. A007949, A356867, A364957 (Dirichlet inverse), A365462, A365464, A365465.
Cf. also A364500.

Programs

  • PARI
    up_to = 19683;
    A356867list(up_to) = { my(v=vector(up_to),met=Map(),h=0,ak); for(i=1,#v,if(1==vecsum(digits(i,3)), v[i] = i; h = i, ak = v[i-h]; forprime(p=2,,if(3!=p && !mapisdefined(met,p*ak), v[i] = p*ak; break))); mapput(met,v[i],i)); (v); };
    v356867 = A356867list(up_to);
    A356867(n) = v356867[n];
    A365463(n) = gcd(n, A356867(n));

Formula

a(n) = gcd(n, A365462(n)) = gcd(A356867(n), A365462(n)).
a(n) = n / A365464(n) = A356867(n) / A365465(n).
For all n >= 1, A007949(a(n)) = A007949(n), A011655(a(n)) = A011655(n).

A365432 a(n) = A156552(A364502(n)), where A364502(n) = A005940(n) / gcd(n, A005940(n)), and A156552 is the inverse of offset-0 version of Doudna-sequence A005940.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 6, 0, 8, 0, 10, 0, 12, 6, 6, 0, 16, 8, 18, 0, 4, 10, 22, 0, 24, 12, 12, 6, 28, 6, 30, 0, 32, 16, 34, 8, 36, 18, 18, 0, 40, 4, 42, 10, 20, 22, 46, 0, 48, 24, 24, 12, 52, 12, 22, 6, 56, 28, 58, 6, 60, 30, 14, 0, 64, 32, 66, 16, 68, 34, 70, 8, 72, 36, 16, 18, 12, 18, 78, 0, 80, 40, 82, 4, 40, 42, 42, 10
Offset: 1

Views

Author

Antti Karttunen, Sep 07 2023

Keywords

Crossrefs

Cf. A005940, A364500, A341520, A365430, A365431 (rgs-transform).

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    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)); };
    A365432(n) = A156552(A364502(n));

Formula

For all n >= 1, a(n) <= n-1 and A341520(a(n), A365430(n)) = n-1.

A365430 a(n) = A156552(gcd(n, A005940(n))), and A156552 is the inverse of offset-0 version of Doudna-sequence A005940.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 0, 7, 0, 9, 0, 11, 0, 1, 2, 15, 0, 1, 0, 19, 8, 1, 0, 23, 0, 1, 2, 3, 0, 5, 0, 31, 0, 1, 0, 3, 0, 1, 2, 39, 0, 17, 0, 3, 4, 1, 0, 47, 0, 1, 2, 3, 0, 5, 4, 7, 0, 1, 0, 11, 0, 1, 6, 63, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 10, 3, 16, 5, 0, 79, 0, 1, 0, 35, 4, 1, 2, 7, 0, 9, 8, 3, 0, 1, 4, 95, 0, 1, 34, 3
Offset: 1

Views

Author

Antti Karttunen, Sep 07 2023

Keywords

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A364500(n) = { my(orgn=n,p=2,rl=0,z=1); n--; while(n, if(!(n%2), p=nextprime(1+p), rl++; if(1==(n%4), z *= p^min(rl,valuation(orgn,p)); rl=0)); n>>=1); (z); };
    A365430(n) = A156552(A364500(n));

Formula

a(n) = A156552(A364500(n)).
For all n >= 1, a(n) <= n-1 and A341520(a(n), A365432(n)) = n-1.
Showing 1-7 of 7 results.