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

A065339 Number of primes congruent to 3 modulo 4 dividing n (with multiplicity).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0, 2, 1, 1, 1, 0, 0, 3, 1, 0, 1, 1, 0, 2, 0, 1, 2, 0, 1, 1, 0, 0, 2, 1, 1, 2, 1, 1, 1, 2, 0, 1, 0, 0, 3, 1, 1, 2, 0, 1, 1, 0, 1, 3, 0, 0, 2, 1, 0, 2, 1, 1, 2, 0, 0, 1, 1, 2, 1, 1, 0, 4, 0, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 1, 0, 2, 3, 0, 0, 1, 1, 0, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 29 2001

Keywords

Crossrefs

Programs

  • Haskell
    a065339 1 = 0
    a065339 n = length [x | x <- a027746_row n, mod x 4 == 3]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Maple
    A065339 := proc(n)
        a := 0 ;
        for f in ifactors(n)[2] do
            if op(1,f) mod 4 = 3 then
                a := a+op(2,f) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Dec 16 2011
  • Mathematica
    f[n_]:=Plus@@Last/@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==3&]; Table[f[n],{n,100}] (* Ray Chandler, Dec 18 2011 *)
  • PARI
    A065339(n)=sum(i=1,#n=factor(n)~,if(n[1,i]%4==3,n[2,i]))  \\ M. F. Hasler, Apr 16 2012
    
  • Scheme
    ;; using memoization-macro definec
    (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) (else (+ (/ (- (modulo (A020639 n) 4) 1) 2) (A065339 (A032742 n))))))
    ;; Antti Karttunen, Aug 14 2015
    
  • Scheme
    ;; using memoization-macro definec
    (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) ((= 1 (modulo (A020639 n) 4)) (A065339 (A032742 n))) (else (+ (A067029 n) (A065339 (A028234 n))))))
    ;; Antti Karttunen, Aug 14 2015

Formula

a(n) = A001222(n) - A007814(n) - A083025(n).
(2^A007814(n)) * (3^a(n)) = A065338(n).
From Antti Karttunen, Aug 14 2015: (Start)
a(1) = a(2) = 0; thereafter, if n is even, a(n) = a(n/2), otherwise a(n) = ((A020639(n) mod 4)-1)/2 + a(n/A020639(n)). [Where A020639(n) gives the smallest prime factor of n.]
Other identities and observations. For all n >= 1:
a(n) = A007949(A065338(n)).
a(n) = A001222(A097706(n)).
a(n) >= A260728(n). [See A260730 for the positions of differences.] (End)
Totally additive with a(2) = 0, a(p) = 1 if p == 3 (mod 4), and a(p) = 0 if p == 1 (mod 4). - Amiram Eldar, Jun 17 2024

A260728 Bitwise-OR of the exponents of all 4k+3 primes in the prime factorization of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0, 1, 1, 1, 1, 0, 0, 3, 1, 0, 1, 1, 0, 1, 0, 1, 2, 0, 1, 1, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 0, 1, 0, 0, 3, 1, 1, 1, 0, 1, 1, 0, 1, 3, 0, 0, 1, 1, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 1, 1, 0, 4, 0, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 0, 2, 3, 0, 0, 1, 1, 0, 1, 0, 1, 3, 0, 1, 1, 1, 0, 1, 1, 0, 2, 1, 1, 1
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Comments

A001481 (numbers that are the sum of 2 squares) gives the positions of even terms in this sequence, while its complement A022544 (numbers that are not the sum of 2 squares) gives the positions of odd terms.
If instead of bitwise-oring (A003986) we added in ordinary way the exponents of 4k+3 primes together, we would get the sequence A065339. For the positions where these two sequences differ see A260730.

Examples

			For n = 21 = 3^1 * 7^1 we compute A003986(1,1) = 1, thus a(21) = 1.
For n = 63 = 3^2 * 7^1 we compute A003986(2,1) = A003986(1,2) = 3, thus a(63) = 3.
		

Crossrefs

Cf. also A267113, A267116, A267099.
Differs from A065339 for the first time at n=21, where a(21) = 1, while A065339(21)=2.

Programs

Formula

If n < 3, a(n) = 0; thereafter, for any even n: a(n) = a(n/2), for any n with its smallest prime factor (A020639) of the form 4k+1: a(n) = a(A032742(n)), otherwise [when A020639(n) is of the form 4k+3] a(n) = A003986(A067029(n),a(A028234(n))).
Other identities. For all n >= 0:
A229062(n) = 1 - A000035(a(n)). [Reduced modulo 2 and complemented, the sequence gives the characteristic function of A001481.]
a(n) = a(A097706(n)). [The result depends only on the prime factors of the form 4k+3.]
a(n) = A267116(A097706(n)).
a(n) = A267113(A267099(n)).

A268376 Numbers n for which A001222(n) > A267116(n).

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 24, 26, 30, 33, 34, 35, 36, 38, 39, 40, 42, 46, 51, 54, 55, 56, 57, 58, 60, 62, 65, 66, 69, 70, 72, 74, 77, 78, 82, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 100, 102, 104, 105, 106, 108, 110, 111, 114, 115, 118, 119, 120, 122, 123, 126, 129, 130, 132, 133, 134, 135, 136, 138, 140, 141
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Comments

Numbers n such that in their prime factorization n = p_1^e_1 * ... * p_k^e_k, there is at least one pair of exponents e_i and e_j (i and j distinct), such that their base-2 representations have at least one shared digit-position in which both exponents have 1-bit.

Examples

			n = 6 = 2^1 * 3^1 is included as both exponents, 1 and 1 ("1" in binary) have both 1-bit in position 0 of their binary representations.
n = 24 = 2^3 * 3^1 is included as both exponents, 1 and 3 ("01" and "11" in binary) have both 1-bit in position 0 of their binary representations.
n = 36 = 2^2 * 3^2 is included as both exponents, 2 and 2 ("10" in binary) have both 1-bit in position 1 of their binary representations.
n = 60 = 2^2 * 3^1 * 5^1 is included as the exponents of 3 and 5, both of which are 1, have both 1-bit in position 1 of their binary representations.
		

Crossrefs

Indices of nonzeros in A268374.
Subsequence of A002808 and A024619.
Cf. A268375 (complement).
Cf. A260730 (subsequence).
Cf. also A267117.
Differs from A067582(n+1) for the first time at n=25, where a(n) = 60, a value which is missing from A067582.

Programs

  • Mathematica
    Select[Range@ 144, PrimeOmega@ # > BitOr @@ Map[Last, FactorInteger@ #] &] (* Michael De Vlieger, Feb 04 2016 *)
Showing 1-3 of 3 results.