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-4 of 4 results.

A065043 Characteristic function of the numbers with an even number of prime factors (counted with multiplicity): a(n) = 1 if n = A028260(k) for some k then 1 else 0.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2001

Keywords

Crossrefs

Characteristic function of A028260 (positions of 1's). Cf. also A026424 (positions of 0's) and A320655.
One less than A007421.
Cf. also A066829, A353374.

Programs

  • Maple
    A065043 := proc(n)
        if type(numtheory[bigomega](n),'even') then
            1;
        else
            0;
        end if;
    end proc: # R. J. Mathar, Jun 26 2013
  • Mathematica
    Table[(LiouvilleLambda[n]+1)/2,{n,1,20}] (* Enrique Pérez Herrero, Jul 07 2012 *)
  • PARI
    { for (n=1, 1000, a=1 - bigomega(n)%2; write("b065043.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 04 2009
    
  • PARI
    A065043(n) = (1 - (bigomega(n)%2)); \\ Antti Karttunen, Apr 19 2022
    
  • Python
    from operator import ixor
    from functools import reduce
    from sympy import factorint
    def A065043(n): return (reduce(ixor, factorint(n).values(),0)&1)^1 # Chai Wah Wu, Jan 01 2023

Formula

a(n) = 1 - A001222(n) mod 2.
a(n) = A007421(n) - 1.
a(n) = 1 - A066829(n).
a(A028260(k)) = 1 and a(A026424(k)) = 0 for all k.
Dirichlet g.f.: (zeta(s)^2 + zeta(2*s))/(2*zeta(s)). - Enrique Pérez Herrero, Jul 06 2012
a(n) = (A008836(n) + 1)/2. - Enrique Pérez Herrero, Jul 07 2012
a(n) = A001222(2n) mod 2. - Wesley Ivan Hurt, Jun 22 2013
G.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = Sum_{n>=1} x^(n^2)/(1 - x^n). - Ilya Gutkovskiy, Apr 25 2017
From Antti Karttunen, Dec 01 2022: (Start)
For x, y >= 1, a(x*y) = 1 - abs(a(x)-a(y)).
a(n) = a(A046523(n)) = A356163(A003961(n)).
a(n) = A000035(A356163(n)+A347102(n)).
a(n) = A010052(n) + A353669(n).
a(n) = A353555(n) + A353557(n).
a(n) = A358750(n) + A358752(n).
a(n) = A353374(n) + A358775(n).
a(n) >= A356170(n).
(End)

Extensions

Corrected by Charles R Greathouse IV, Sep 02 2009

A347101 Fully multiplicative with a(prime(k)) = A001223(k), where A001223 gives the distance from the k-th prime to the (k+1)-th prime.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 4, 1, 4, 2, 2, 2, 4, 4, 4, 1, 2, 4, 4, 2, 8, 2, 6, 2, 4, 4, 8, 4, 2, 4, 6, 1, 4, 2, 8, 4, 4, 4, 8, 2, 2, 8, 4, 2, 8, 6, 6, 2, 16, 4, 4, 4, 6, 8, 4, 4, 8, 2, 2, 4, 6, 6, 16, 1, 8, 4, 4, 2, 12, 8, 2, 4, 6, 4, 8, 4, 8, 8, 4, 2, 16, 2, 6, 8, 4, 4, 4, 2, 8, 8, 16, 6, 12, 6, 8, 2, 4, 16, 8, 4, 2, 4, 4, 4, 16
Offset: 1

Views

Author

Antti Karttunen, Aug 19 2021

Keywords

Crossrefs

Cf. A000079 (positions of 1's), A001223, A347102, A347123.

Programs

  • PARI
    A347101(n) = { my(f=factor(n)); for(i=1, #f~, f[i, 1] = (nextprime(f[i, 1]+1)-f[i,1])); factorback(f); };

Formula

For all n >= 0, a(2^n) = 1.

A347123 Fully multiplicative with a(prime(k)) = prime(1+floor(A001223(k)/2)).

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 5, 8, 9, 6, 3, 12, 5, 10, 9, 16, 3, 18, 5, 12, 15, 6, 7, 24, 9, 10, 27, 20, 3, 18, 7, 32, 9, 6, 15, 36, 5, 10, 15, 24, 3, 30, 5, 12, 27, 14, 7, 48, 25, 18, 9, 20, 7, 54, 9, 40, 15, 6, 3, 36, 7, 14, 45, 64, 15, 18, 5, 12, 21, 30, 3, 72, 7, 10, 27, 20, 15, 30, 5, 48, 81, 6, 7, 60, 9, 10, 9, 24, 11, 54
Offset: 1

Views

Author

Antti Karttunen, Aug 19 2021

Keywords

Crossrefs

Programs

  • PARI
    A347123(n) = { my(f=factor(n)); for(i=1, #f~, f[i, 1] = prime(1+((nextprime(f[i, 1]+1)-f[i,1])\2))); factorback(f); };

Formula

For all n >= 1, A001222(a(n)) = A001222(n), A007814(a(n)) = A007814(n).
For all n >= 1, a(A003586(n)) = A003586(n).

A345161 If n = Product (p_j^k_j) then a(n) = max (nextprime(p_j) - p_j), where nextprime = A151800.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 2, 2, 4, 4, 2, 1, 2, 2, 4, 2, 4, 2, 6, 2, 2, 4, 2, 4, 2, 2, 6, 1, 2, 2, 4, 2, 4, 4, 4, 2, 2, 4, 4, 2, 2, 6, 6, 2, 4, 2, 2, 4, 6, 2, 2, 4, 4, 2, 2, 2, 6, 6, 4, 1, 4, 2, 4, 2, 6, 4, 2, 2, 6, 4, 2, 4, 4, 4, 4, 2, 2, 2, 6, 4, 2, 4, 2, 2, 8, 2
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 26 2021

Keywords

Examples

			a(39) = a(3 * 13) = a(prime(2) * prime(6)), prime(3) - prime(2) = 5 - 3 = 2, prime(7) - prime(6) = 17 - 13 = 4, so a(39) = max(2, 4) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max @@ (NextPrime[#[[1]]] - #[[1]] & /@ FactorInteger[n]); Table[a[n], {n, 1, 90}]

Formula

If n = Product (p_j^k_j) then a(n) = max (prime(pi(p_j) + 1) - p_j), where pi = A000720.
a(2^j*n) = a(n).
a(n^j) = a(n), j > 0.
a(prime(n)^j) = A001223(n), j > 0.
a(n!) = A327441(n).
a(prime(n)#) = A063095(n).
2 + Sum_{k=1..n-1} a(prime(k)^j) = prime(n), j > 0.
Sum_{d|n} mu(n/d) * a(d) = 0 if n is an even number or an odd number divisible by a square > 1.
Showing 1-4 of 4 results.