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 21-29 of 29 results.

A170819 a(n) = product of distinct primes of the form 4k-1 that divide n.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 3, 1, 11, 3, 1, 7, 3, 1, 1, 3, 19, 1, 21, 11, 23, 3, 1, 1, 3, 7, 1, 3, 31, 1, 33, 1, 7, 3, 1, 19, 3, 1, 1, 21, 43, 11, 3, 23, 47, 3, 7, 1, 3, 1, 1, 3, 11, 7, 57, 1, 59, 3, 1, 31, 21, 1, 1, 33, 67, 1, 69, 7, 71, 3, 1, 1, 3, 19, 77, 3, 79, 1, 3, 1, 83, 21, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 2009

Keywords

Crossrefs

Programs

  • Maple
    A170819 := proc(n) a := 1 ; for p in numtheory[factorset](n) do if p mod 4 = 3 then a := a*p ; end if; end do: a ; end proc:
    seq(A170819(n),n=1..20) ; # R. J. Mathar, Jun 07 2011
  • Mathematica
    Array[Times @@ Select[FactorInteger[#][[All, 1]], Mod[#, 4] == 3 &] &, 85] (* Michael De Vlieger, Feb 19 2019 *)
  • PARI
    for(n=1,99, t=select(x->x%4==3, factor(n)[,1]); print1(prod(i=1,#t,t[i])","))

Formula

Multiplicative with a(p^e) = p^A011765(p+1), e > 0. - R. J. Mathar, Jun 07 2011
a(n) = A007947(A097706(n)) = A097706(A007947(n)). - Peter Munn, Jul 06 2023

Extensions

Extended with PARI program by M. F. Hasler, Dec 23 2009

A268381 Numbers having at least the same number of prime factors of the form 4*k+1 than of the form 4*k+3, when counted with multiplicity.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 13, 15, 16, 17, 20, 25, 26, 29, 30, 32, 34, 35, 37, 39, 40, 41, 50, 51, 52, 53, 55, 58, 60, 61, 64, 65, 68, 70, 73, 74, 75, 78, 80, 82, 85, 87, 89, 91, 95, 97, 100, 101, 102, 104, 106, 109, 110, 111, 113, 115, 116, 119, 120, 122, 123, 125, 128, 130, 136, 137, 140, 143, 145, 146, 148, 149, 150
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.

Crossrefs

Complement: A268380.
Disjoint union of A072202 and A268379.

Programs

  • Mathematica
    Position[Array[Map[Length, {Select[#, Mod[#, 4] == 1 &], Select[#, Mod[#, 4] == 3 &]}] &@ Flatten@ Apply[Table[#1, {#2}] &, FactorInteger@ #, 1] &, {150}], {a_, b_} /; a >= b] // Flatten (* Michael De Vlieger, Feb 05 2016 *)

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

A202237 Odd numbers with the same number of prime factors of the form 4*k+1 and 4*k+3.

Original entry on oeis.org

1, 15, 35, 39, 51, 55, 87, 91, 95, 111, 115, 119, 123, 143, 155, 159, 183, 187, 203, 215, 219, 225, 235, 247, 259, 267, 287, 291, 295, 299, 303, 319, 323, 327, 335, 339, 355, 371, 391, 395, 403, 407, 411, 415, 427, 447, 451, 471, 511, 515, 519, 525, 527, 535, 543, 551
Offset: 1

Views

Author

Keywords

Comments

Primes are counted with multiplicity.
Closed under multiplication.

Crossrefs

Cf. A080774 (primitive elements), A072202 (even allowed).

Programs

  • Maple
    isA202237 := proc(n)
        if type(n,'odd') then
            A083025(n) = A065339(n) ;
        else
            false;
        end if;
    end proc:
    for n from 1 to 200 do
        if isA202237(n) then
            printf("%d,",n);
        end if;
    end do: # R. J. Mathar, Dec 16 2011
  • Mathematica
    fQ[n_]:=Plus@@((Mod[#[[1]], 4]-2)*#[[2]]&/@If[n==1, {}, FactorInteger[n]])==0 && OddQ[n]; Select[Range[600], fQ] (* Ray Chandler, Dec 20 2011 *)
  • PARI
    netprime(n)=local(fm=factor(n));sum(k=1,matsize(fm)[1],if(fm[k,1]==2,0,if(fm[k,1]%4==1,fm[k,2],-fm[k,2])))
    ap(n)=forstep(k=1,n,2,if(netprime(k)==0,print1(k", ")))

A268378 Numbers whose prime factorization includes at least one prime factor of form 4k+3 and any prime factor of the form 4k+1 has even 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, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 66, 67, 69, 71, 72, 75, 76, 77, 79, 81, 83, 84, 86, 88, 92, 93, 94, 96, 98, 99, 103, 107, 108, 112, 114, 118, 121, 124, 126, 127, 129, 131, 132, 133, 134, 138, 139, 141, 142, 144, 147, 150
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Comments

Closed under multiplication.

Examples

			6 = 2*3 is included, as there is a prime factor of the form 4k+3 present.
75 = 3 * 5 * 5 is included, as there is a prime factor of the form 4k+3 present and the prime factor of the form 4k+1 (5) is present twice.
		

Crossrefs

Subsequence of A268377.
Differs from A221264 for the first time at n=38, which here is a(38) = 75, a value missing from A221264.

Programs

  • Mathematica
    Select[Range@ 150, AnyTrue[#, Mod[First@ #, 4] == 3 &] && NoneTrue[#, And[Mod[First@ #, 4] == 1, OddQ@ Last@ #] &] &@ FactorInteger@ # &] (* Michael De Vlieger, Feb 04 2016, Version 10 *)
  • PARI
    isok(n) = {my(f = factor(n), nb3 = 0); for (i=1, #f~, if (((f[i,1] % 4) == 1) && (f[i,2] % 2), return (0)); if ((f[i,1] % 4) == 3, nb3++);); return (nb3);} \\ Michel Marcus, Feb 04 2016

A278509 a(n) = 3^{number of primes congruent to 3 modulo 4 dividing n (with multiplicity)}.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 3, 1, 9, 1, 3, 3, 1, 3, 3, 1, 1, 9, 3, 1, 9, 3, 3, 3, 1, 1, 27, 3, 1, 3, 3, 1, 9, 1, 3, 9, 1, 3, 3, 1, 1, 9, 3, 3, 9, 3, 3, 3, 9, 1, 3, 1, 1, 27, 3, 3, 9, 1, 3, 3, 1, 3, 27, 1, 1, 9, 3, 1, 9, 3, 3, 9, 1, 1, 3, 3, 9, 3, 3, 1, 81, 1, 3, 9, 1, 3, 3, 3, 1, 9, 3, 3, 9, 3, 3, 3, 1, 9, 27, 1, 1, 3, 3, 1, 9, 1, 3, 27, 1, 3, 3, 3, 1, 9, 3, 1, 9, 3, 3, 3
Offset: 1

Views

Author

Antti Karttunen, Nov 28 2016

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := Mod[p, 4]^e; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 13 2023 *)
  • Scheme
    (define (A278509 n) (A065338 (A000265 n)))

Formula

Fully multiplicative with a(p^e) = 1 if p = 2, (p mod 4)^e if p > 2.
a(n) = A065338(A000265(n)) = A000265(A065338(n)).
a(n) = A000244(A065339(n)) = 3^A065339(n).

A378194 Rectangular array, read by descending antidiagonals: row n shows the integers m such that the number of primes of the form 4k+3 (including multiplicities) that divide m is n-1.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 5, 7, 18, 27, 8, 11, 21, 54, 81, 10, 12, 33, 63, 162, 243, 13, 14, 36, 99, 189, 486, 729, 16, 15, 42, 108, 297, 567, 1458, 2187, 17, 19, 45, 126, 324, 891, 1701, 4374, 6561, 20, 22, 49, 135, 378, 972, 2673, 5103, 13122, 19683, 25, 23, 57, 147, 405, 1134, 2916, 8019, 15309, 39366, 59049, 26, 24, 66, 171, 441, 1215, 3402, 8748, 24057, 45927, 118098, 177147
Offset: 1

Views

Author

Clark Kimberling, Jan 14 2025

Keywords

Comments

Every positive integer occurs exactly once.

Examples

			Corner:
      1     2     4     5     8     10     13     16      17
      3     6     7    11    12     14     15     19      22
      9    18    21    33    36     42     45     49      57
     27    54    63    99   108    126    135    147     171
     81   162   189   297   324    378    405    441     513
    243   486   567   891   972   1134   1215   1323    1539
    729  1458  1701  2673  2916   3402   3645   3969    4617
   2187  4374  5103  8019  8748  10206  10935  11907   13851
		

Crossrefs

Cf. A065339, A002144, A002145, A376961, A378193, A072437 (row 1), A000244 (column 0), A025192 (column 1).

Programs

  • Maple
    A378194 := proc(n, k)
        option remember;
        local a;
        if k = 0 then
            0;
        else
            for a from procname(n, k-1)+1 do
                if A065339(a) = n-1 then
                    return a;
                end if;
            end do;
        end if;
    end proc:
    seq(seq( A378194(n, d-n), n=1..d-1), d=2..10) ; # R. J. Mathar, Jan 28 2025
  • Mathematica
    u = Map[Map[#[[1]] &, #] &, GatherBy[
        SortBy[Map[{#, 1 + Count[Map[IntegerQ[(# - 3)/4] && PrimeQ[#] &,
                 Flatten[Map[ConstantArray[#[[1]], #[[2]]] &,
                 FactorInteger[#]]]], True]} &,
          Range[24000]], #[[2]] &], #[[2]] &]];
    r[m_] := Take[u[[m]], 10];
    w[m_, n_] := r[m][[n]];
    Grid[Table[w[m, n], {m, 1, 8}, {n, 1, 9}]]   (* array *)
    Table[w[n - k + 1, k], {n, 8}, {k, n, 1, -1}] // Flatten  (* sequence *)
    (* Peter J. C. Moses, Nov 19 2024 *)

Extensions

Definition corrected. - R. J. Mathar, Jan 28 2025

A378879 a(n) = number of non-Pythagorean primes in the prime factorization of n (including multiplicities).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 14 2025

Keywords

Examples

			a(12) = 3 because 12 = 2*2*3, where 2 (with multiplicity 2) and 3 are non-Pythagorean primes.
		

Crossrefs

Programs

  • Maple
    A378879 := proc(n)
        local a,f ;
        a := 0 ;
        for f in ifactors(n)[2] do
            if op(1, f) mod 4 <> 1 then
                a := a+op(2, f) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A378879(n),n=1..50) ; # R. J. Mathar, Jan 27 2025
  • Mathematica
    f[{x_, y_}] := If[Mod[x, 4] == 1, y, -y];
    s[n_] := Map[f, FactorInteger[n]];
    p[n_] := {Total[Select[s[n], # > 0 &]], -Total[Select[s[n], # < 0 &]]};
    p[1] = {0, 0};
    t = Table[p[n], {n, 1, 135}]
    Map[First, t]   (* A083025 *)
    Map[Last, t]   (* A378879 *)

Formula

From R. J. Mathar, Jan 28 2025: (Start)
a(n) + A083025(n) = A001222(n).
a(n) = A007814(n)+A065339(n). (End)
Totally additive with a(p) = 1 if p = 2 or p == 3 (mod 4), and a(p) = 0 if p == 1 (mod 4). - Amiram Eldar, Jun 09 2025
Previous Showing 21-29 of 29 results.