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.

A072202 Same numbers of prime factors of forms 4*k+1 and 4*k+3, counted with multiplicity.

Original entry on oeis.org

1, 2, 4, 8, 15, 16, 30, 32, 35, 39, 51, 55, 60, 64, 70, 78, 87, 91, 95, 102, 110, 111, 115, 119, 120, 123, 128, 140, 143, 155, 156, 159, 174, 182, 183, 187, 190, 203, 204, 215, 219, 220, 222, 225, 230, 235, 238, 240, 246, 247, 256, 259, 267, 280, 286, 287, 291
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 03 2002

Keywords

Comments

Equivalently, numbers n such that A083025(n) = A065339(n), indices of zeros in A079635.
Closed under multiplication.
Closed with respect to permutation A267099. - Antti Karttunen, Feb 03 2016

Examples

			825 = 3*5*5*11 = [(4*0+3)*(4*2+3)]*[(4*1+1)*(4*1+1)], therefore 825 is a term.
		

Crossrefs

Primitive elements are {2} U A080774. - Franklin T. Adams-Watters, Dec 16 2011.
Subsequence of A078613 and of A268381.

Programs

  • Haskell
    a072202 n = a072202_list !! (n-1)
    a072202_list = [x | x <- [1..], a083025 x == a065339 x]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    f[n_]:=Plus@@Last/@Select[If[==1,{},FactorInteger[n]],Mod[#[[1]],4]==1&]; Table[f[n],{n,100}] (* Ray Chandler, Dec 18 2011 *)
  • PARI
    isok(n) = {my(f = factor(n)); sum(k=1, #f~, ((f[k,1] % 4)==1)*f[k,2]) == sum(k=1, #f~, ((f[k,1] % 4)==3)*f[k,2]);} \\ Michel Marcus, Feb 05 2016
  • Scheme
    (define A072202 (ZERO-POS 1 1 A079635)) ;; [requires also my IntSeq-library] - Antti Karttunen, Feb 03 2016
    

A079635 Sum of (2 - p mod 4) for all prime factors p of n (with repetition).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 30 2003

Keywords

Comments

a(n) = {number of primes of the form 4k+1 dividing n} minus {number of primes of the form 4k+3 dividing n}, both counted with multiplicity. - Antti Karttunen, Feb 03 2016, after the formula.

Examples

			a(55) = a(5*11) = (2 - 5 mod 4)+(2 - 11 mod 4) = (2-1)+(2-3) = (1)+(-1) = 0.
		

Crossrefs

Cf. A072202 (indices of zeros), A268379 (of strictly positive terms), A268380 (of negative terms), A268381 (of nonnegative terms).
Cf. A005094 (difference when counting only distinct primes).

Programs

  • Haskell
    a079635 1 = 0
    a079635 n = sum $ map ((2 - ) . (`mod` 4)) $ a027746_row n
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Maple
    f:= proc(n) local t;
    add(t[2]*(2-(t[1] mod 4)), t=ifactors(n)[2])
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 05 2016
  • Mathematica
    f[n_]:=Plus@@((2-Mod[#[[1]],4])*#[[2]]&/@If[n==1,{},FactorInteger[n]]); Table[f[n],{n,100}] (* Ray Chandler, Dec 20 2011 *)
  • Scheme
    (define (A079635 n) (- (A083025 n) (A065339 n))) ;; Antti Karttunen, Feb 03 2016

Formula

a(n) = A083025(n) - A065339(n).
Other identities. For all n >= 1:
a(A267099(n)) = -a(n). - Antti Karttunen, Feb 03 2016
Totally additive with a(2) = 0, a(p) = 1 if p == 1 (mod 4), and a(p) = -1 if p == 3 (mod 4). - Amiram Eldar, Jun 17 2024

Extensions

Edited by Ray Chandler, Dec 20 2011

A268379 Numbers having more prime factors of the form 4*k+1 than of the form 4*k+3, when counted with multiplicity.

Original entry on oeis.org

5, 10, 13, 17, 20, 25, 26, 29, 34, 37, 40, 41, 50, 52, 53, 58, 61, 65, 68, 73, 74, 75, 80, 82, 85, 89, 97, 100, 101, 104, 106, 109, 113, 116, 122, 125, 130, 136, 137, 145, 146, 148, 149, 150, 157, 160, 164, 169, 170, 173, 175, 178, 181, 185, 193, 194, 195, 197, 200, 202, 205, 208, 212, 218, 221
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Comments

Numbers n for which A083025(n) > A065339(n) or equally, for which A079635(n) > 0.
Closed under multiplication.

Examples

			75 = 3*5*5 is included as there are more prime factors of the form 4k+1 (here two 5's) than of the form 4k+3 (here just one 3).
		

Crossrefs

Cf. also A001481, A072202, A268380.
Subsequence of A268381.
Differs from A221265 for the first time at n=22, as here a(22) = 75, a value missing from A221265.

Programs

  • Mathematica
    Rest@ Position[Array[Map[Length, {Select[#, Mod[#, 4] == 1 &], Select[#, Mod[#, 4] == 3 &]}] &@ Flatten@ Apply[Table[#1, {#2}] &, FactorInteger@ #, 1] &, {221}], {a_, b_} /; a > b] // Flatten (* Michael De Vlieger, Feb 05 2016 *)
  • PARI
    isok(n) = {my(f = factor(n), nb1 = 0, nb3 = 0); for (i=1, #f~, m = f[i,1] % 4; if (m == 1, nb1 += f[i,2], if (m == 3, nb3 += f[i,2]));); return (nb1 > nb3);} \\ Michel Marcus, Feb 04 2016
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A268379_gen(): # generator of terms
        return filter(lambda n:sum((f:=factorint(n)).values())-f.get(2,0) < 2*sum(f[p] for p in f if p & 3 == 1),count(1))
    A268379_list = list(islice(A268379_gen(),30)) # Chai Wah Wu, Jun 28 2022

A268380 Numbers having fewer prime factors of the form 4*k+1 than of the form 4*k+3, when counted with multiplicity.

Original entry on oeis.org

3, 6, 7, 9, 11, 12, 14, 18, 19, 21, 22, 23, 24, 27, 28, 31, 33, 36, 38, 42, 43, 44, 45, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 66, 67, 69, 71, 72, 76, 77, 79, 81, 83, 84, 86, 88, 90, 92, 93, 94, 96, 98, 99, 103, 105, 107, 108, 112, 114, 117, 118, 121, 124, 126, 127, 129, 131, 132, 133, 134, 135, 138, 139, 141
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2016

Keywords

Comments

Numbers n for which A083025(n) < A065339(n) or equally, for which A079635(n) < 0.
Closed under multiplication.

Examples

			45 = 3*3*5 is included as there are more prime factors of the form 4k+3 (here two 3's) than prime factors of the form 4k+1 (here just one 5).
		

Crossrefs

Complement: A268381.
Cf. also A072202, A268379.
Differs from A221264 for the first time at n=23, where a(23) = 45, a value missing from A221264.

Programs

  • Mathematica
    Position[Array[Map[Length, {Select[#, Mod[#, 4] == 1 &], Select[#, Mod[#, 4] == 3 &]}] &@ Flatten@ Apply[Table[#1, {#2}] &, FactorInteger@ #, 1] &, {141}], {a_, b_} /; a < b] // Flatten (* Michael De Vlieger, Feb 05 2016 *)
  • PARI
    isok(n) = {my(f = factor(n)); sum(k=1, #f~, ((f[k,1] % 4)==1)*f[k,2]) < sum(k=1, #f~, ((f[k,1] % 4)==3)*f[k,2]);} \\ Michel Marcus, Feb 05 2016
Showing 1-4 of 4 results.