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-30 of 43 results. Next

A082052 Sum of divisors of n that are not of the form 4k+1.

Original entry on oeis.org

0, 2, 3, 6, 0, 11, 7, 14, 3, 12, 11, 27, 0, 23, 18, 30, 0, 29, 19, 36, 10, 35, 23, 59, 0, 28, 30, 55, 0, 66, 31, 62, 14, 36, 42, 81, 0, 59, 42, 84, 0, 74, 43, 83, 18, 71, 47, 123, 7, 62, 54, 84, 0, 110, 66, 119, 22, 60, 59, 162, 0, 95, 73, 126, 0, 110, 67, 108, 26, 138, 71
Offset: 1

Views

Author

Ralf Stephan, Apr 02 2003

Keywords

Comments

a(A004613(n))=0.

Crossrefs

Programs

  • Mathematica
    sd[n_]:= Total[Select[Divisors[n], !IntegerQ[(# - 1) / 4]&]]; Array[sd, 100] (* Vincenzo Librandi, May 17 2013 *)
    Table[DivisorSum[n,#&,(!IntegerQ[(#-1)/4]&)],{n,80}] (* Harvey P. Dale, Nov 30 2019 *)
  • PARI
    for(n=1,100,print1(sumdiv(n,d,if(d%4!=1,d))","))

Formula

G.f.: Sum_{k>=1} x^(2*k)*(2 + 3*x^k + 4*x^(2*k) + 2*x^(4*k) + x^(5*k))/(1 - x^(4*k))^2. - Ilya Gutkovskiy, Sep 12 2019

A164927 Sum of the odd prime divisors of numbers with all odd prime divisors of the form 4k+1.

Original entry on oeis.org

5, 5, 13, 17, 5, 5, 13, 29, 17, 37, 5, 41, 5, 13, 53, 29, 61, 18, 17, 73, 37, 5, 41, 22, 89, 97, 5, 101, 13, 53, 109, 113, 29, 61, 5, 18, 17, 137, 34, 73, 37, 149, 157, 5, 41, 13, 22, 173, 89, 181, 42, 193, 97, 197, 5, 101, 46, 13, 53, 109, 30, 113, 229, 29, 233, 241, 61, 5, 257
Offset: 1

Views

Author

Jonathan Vos Post, Aug 31 2009

Keywords

Comments

We define a sequence b(n) = 5, 10, 13, 17, 20, 25, 26, 29, 34, 37, 40, 41, 50, 52, 53, 58, 61, 65, 68, 73, ... to consist of those numbers where all odd prime factors are primes contained in A002144, and which have at least one prime factor in this class.
b(n) differs from A009003 which also contains numbers like 30=2*3*5 or 39=3*13, 3 not being in A002144.
b(n) essentially contains elements of A004613 multiplied by powers of 2.
a(n) is the sum of the distinct odd prime factors of b(n), where "distinct" means that the multiplicity (exponent) in the prime factorization of b(n) is ignored.
Sum of distinct Pythagorean prime divisors of integers whose only odd prime divisors are Pythagorean primes A002144.
Analogous sequence for primes of form 4k+3 is A164928.
Analogous sequence for primes of form 6k+1 is A164929.
Analogous sequence for primes of form 6k+5 is A164930.

Examples

			a(18) = 18 because b(18) = 65 = 5*13, and 5+13 = 18.
The smallest number, all of whose prime factors are of form 4n+1, whose sum of distinct prime factors is prime: 1885 = 5 * 13 * 29; and 5 + 13 + 29 = 47.
		

Crossrefs

Programs

  • Maple
    isb := proc(n) fs := numtheory[factorset](n) minus {2} ; if fs = {} then RETURN(false); else for f in fs do if op(1,f) mod 4 <> 1 then RETURN(false) ; fi; od: RETURN(true) ; fi; end:
    b := proc(n) if n = 1 then 5; else for a from procname(n-1)+1 do if isb(a) then RETURN(a) ; fi; od: fi; end:
    A164927 := proc(n) local f; numtheory[factorset]( b(n)) minus {2} ; add(f,f=%) ; end: seq(A164927(n),n=1..120) ; # R. J. Mathar, Sep 09 2009

Extensions

Edited, definition clarified by R. J. Mathar, Sep 08 2009

A231754 Products of distinct primes congruent to 1 modulo 4 (A002144).

Original entry on oeis.org

1, 5, 13, 17, 29, 37, 41, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 137, 145, 149, 157, 173, 181, 185, 193, 197, 205, 221, 229, 233, 241, 257, 265, 269, 277, 281, 293, 305, 313, 317, 337, 349, 353, 365, 373, 377, 389, 397, 401, 409, 421, 433, 445, 449
Offset: 1

Views

Author

Michel Marcus, Nov 13 2013

Keywords

Comments

Contains A002144 as a subsequence, and is a subsequence of A016813 and of A005117.
Also, these numbers satisfy A231589(n) = floor(n*(n-1)/4) (A011848).

Examples

			65 = 5*13 is in the sequence since both 5 and 13 are congruent to 1 modulo 4.
		

Crossrefs

Intersection of A005117 and A004613.

Programs

  • Maple
    isA231754 := proc(n)
        local d;
        for d in ifactors(n)[2] do
            if op(2,d) > 1 then
                return false;
            elif modp(op(1,d),4) <> 1 then
                return false;
            end if;
        end do:
        true ;
    end proc:
    for n from 1 to 500 do
        if isA231754(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Mar 16 2016
  • Mathematica
    Select[Range[500], # == 1 || AllTrue[FactorInteger[#], Last[#1] == 1 && Mod[First[#1], 4] == 1 &] &] (* Amiram Eldar, Mar 08 2024 *)
  • PARI
    isok(n) = if (! issquarefree(n), return (0)); if (n > 1, f = factor(n); for (i=1, #f~, if (f[i, 1] % 4 != 1, return (0)))); 1

Formula

The number of terms that do not exceed x is ~ c * x / sqrt(log(x)), where c = A088539 * sqrt(A175647) / Pi = 0.3097281805... (Jakimczuk, 2024, Theorem 3.10, p. 26). - Amiram Eldar, Mar 08 2024

A369108 a(n) is the number of numbers less than or equal to 10^n that are divisible only by primes congruent to 1 mod 4.

Original entry on oeis.org

2, 15, 123, 1074, 9623, 87882, 814183, 7618317, 71838469, 681591775, 6499182987
Offset: 1

Views

Author

Stefano Spezia, Jan 13 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Join[{1}, Select[Range[10^n], PrimeQ[f = First/@FactorInteger[#]] == Table[True, {j,PrimeNu[#]}] && Mod[f,4] == Table[1, {m,PrimeNu[#]}] && #<=10^n &]]]; Array[a, 9]
  • PARI
    is1(n) = n % 4 == 1 && factorback(factor(n)[, 1] % 4) == 1 \\ Charles R Greathouse IV at A004613
    lista(nmax) = {my(c = 0, pow = 10, n = 1, nm = nmax + 1); for(k = 1, 10^nmax + 1, if(k > pow, print1(c, ", "); pow *= 10; n++; if(n == nm, break)); if(is1(k), c++));} \\ Amiram Eldar, Jun 03 2024

Extensions

a(10)-a(11) from Amiram Eldar, Jun 03 2024

A369109 a(n) is the number of pairs of twin primes p and p+2 both less than or equal to 10^n such that p is congruent to 1 modulo 4.

Original entry on oeis.org

1, 4, 19, 105, 604, 4046, 29482, 220419, 1712731, 13706592, 112196635, 935286453
Offset: 1

Views

Author

Stefano Spezia, Jan 13 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Range[10^n-2], PrimeQ[#] && PrimeQ[#+2] && Mod[#,4] == 1 &]]; Array[a,10]
  • PARI
    lista(nmax) = {my(prev = 2, c = 0, pow = 10, n = 1, nm = nmax + 1); forprime(p = 3, , if(p > pow, print1(c, ", "); pow *= 10; n++; if(n == nm, break)); if(prev % 4 == 1 && p == prev + 2, c++); prev = p);} \\ Amiram Eldar, Jun 03 2024

Extensions

a(11)-a(12) from Amiram Eldar, Jun 03 2024

A072592 Even numbers with at least one prime factor of form 4*k+1.

Original entry on oeis.org

10, 20, 26, 30, 34, 40, 50, 52, 58, 60, 68, 70, 74, 78, 80, 82, 90, 100, 102, 104, 106, 110, 116, 120, 122, 130, 136, 140, 146, 148, 150, 156, 160, 164, 170, 174, 178, 180, 182, 190, 194, 200, 202, 204, 208, 210, 212, 218, 220, 222, 226, 230, 232, 234, 238
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Comments

Conjecture: this is exactly the sequence whose terms are twice those of A009003. (This has been verified for all terms<=500.) Compare A009003. - John W. Layman, Mar 12 2008
The conjecture is true. See comments on A008846 and A004613. - Lambert Herrgesell (zero815(AT)googlemail.com), Apr 24 2008

Crossrefs

Programs

Formula

A072591(a(n)) = 0.

A240370 Positive integers n such that every element in the ring of integers modulo n can be written as the sum of two squares modulo n.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 46, 47, 50, 51, 53, 55, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113, 114, 115, 118, 119, 122, 123, 125, 127, 129, 130, 131, 133, 134, 137, 138, 139, 141, 142, 143, 145, 146, 149, 150, 151, 154, 155, 157, 158, 159, 161, 163, 165, 166, 167, 169
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that, if p^2 divides n for any prime p, then p = 1 mod 4.
Equivalently, squarefree numbers times A004613.
Thus, numbers k such that A065338(A057521(k)) = 1. - Antti Karttunen, Jun 21 2014
Different from A193304: terms 169, 289, 338, 507, 578, 841, 845, 867, ... are here but not in A193304. - Michel Marcus, Jun 20 2014
The asymptotic density of this sequence is 3/(8*K^2) = (3/4) * A243379 = 0.64208..., where K is the Landau-Ramanujan constant (A064533). - Amiram Eldar, Dec 19 2020

Examples

			In Z_7, 0^2 + 0^2 = 0, 1^2 + 0^2 = 1, 1^2 + 1^2 = 2, 3^2 + 1^2 = 3, 2^2 + 0^2 = 4, 2^2 + 1^2 = 5, 3^2 + 2^2 = 6. Therefore 7 is in the sequence.
In Z_8, there is no way to express 3 as a sum of two squares. Therefore 8 is not in the sequence.
		

Crossrefs

The subsequence A240109 is a version not allowing 0.
Different from A193304.
Complement of A053443. Subsequence of A192450.

Programs

  • Mathematica
    rad[n_] := Times @@ First /@ FactorInteger[n];
    a57521[n_] := n/Denominator[n/rad[n]^2];
    a65338[n_] := a65338[n] = If[n==1, 1, Mod[p = FactorInteger[n][[1, 1]], 4]* a65338[n/p]];
    Select[Range[200], a65338[a57521[#]] == 1&] (* Jean-François Alcover, Sep 22 2018, after Antti Karttunen *)
    Select[Range[200], AllTrue[FactorInteger[#], Mod[First[#1], 4] == 1 || Last[#1] == 1 &] &] (* Amiram Eldar, Dec 19 2020 *)
  • PARI
    is(n)=my(f=factor(n)); for(i=1,#f~,if(f[i,2]>1 && f[i,1]%4>1, return(0))); 1
    
  • PARI
    isok(n) = { if (n < 2, return (0)); if ((n % 4) == 0, return (0)); forprime(q = 2, n, if (((q % 4) == 3) && ((n % q) == 0) && ((n % q^2) == 0), return (0)); ); return (1); } \\ Michel Marcus, Jun 08 2014
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A240370 (MATCHING-POS 1 1 (lambda (k) (= 1 (A065338 (A057521 k))))))
    ;; Antti Karttunen, Jun 21 2014

A336930 Numbers k such that the 2-adic valuation of A003973(k), the sum of divisors of the prime shifted k is equal to the 2-adic valuation of the number of divisors of k.

Original entry on oeis.org

1, 3, 4, 9, 11, 12, 13, 16, 23, 25, 27, 31, 33, 36, 37, 39, 44, 47, 48, 49, 52, 59, 64, 69, 71, 75, 81, 83, 89, 92, 93, 97, 99, 100, 107, 108, 109, 111, 117, 121, 124, 131, 132, 139, 141, 143, 144, 147, 148, 151, 156, 167, 169, 176, 177, 179, 188, 191, 192, 193, 196, 207, 208, 213, 225, 227, 229, 236, 239, 243, 249, 251
Offset: 1

Views

Author

Antti Karttunen, Aug 17 2020

Keywords

Comments

Numbers k for which A295664(k) is equal to A336932(k). Note that A295664(A003961(n)) = A295664(n).
Numbers k such that A003961(A007913(k)) [or equally, A007913(A003961(k))] is in A004613, i.e., has only prime divisors of the form 4k+1.
Subsequences include squares (A000290), and also primes p which when prime-shifted [as A003961(p)] become primes of the form 4k+1 (A002144), and all their powers as well as the products between these.

Crossrefs

Programs

  • PARI
    A007814(n) = valuation(n, 2);
    A336931(n) = { my(f=factor(n)); sum(i=1, #f~, (f[i, 2]%2) * (A007814(1+nextprime(1+f[i, 1]))-1)); };
    isA336930(n) = !A336931(n);
    
  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    isA004613(n) = (1==(n%4) && 1==factorback(factor(n)[, 1]%4)); \\ After code in A004613.
    isA336930(n) = isA004613(A003961(core(n)));
    
  • Python
    from math import prod
    from itertools import count, islice
    from sympy import factorint, nextprime, divisor_count
    def A336930_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:(~(m:=prod(((q:=nextprime(p))**(e+1)-1)//(q-1) for p,e in factorint(n).items()))& m-1).bit_length()==(~(k:=int(divisor_count(n))) & k-1).bit_length(),count(max(startvalue,1)))
    A336930_list = list(islice(A336930_gen(),30)) # Chai Wah Wu, Jul 05 2022

A350872 Number of coincidence site lattices of index n in square lattice.

Original entry on oeis.org

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

Views

Author

Andrey Zabolotskiy, Jan 20 2022

Keywords

Comments

A coincidence site lattice (CSL), or coincidence sublattice, is a full-rank sublattice arising as an intersection of the parent lattice with its copy rotated around the origin. It is necessarily primitive.
A primitive sublattice of the square lattice is a CSL if it is square (i. e., similar to the parent lattice) and has odd index.
In this sequence, any two CSLs differing by any isometry are counted as distinct.
a(n) is also the number of ordered pairs of coprime integers (p, q) with p >= 0 and q > 0 such that p^2 + q^2 = n^2.

Examples

			a(5) = 2 index-5 CSLs have bases (2, 1), (-1, 2) and (1, 2), (-2, 1).
		

Crossrefs

Cf. A031358 (nonzero quadrisection), A004613 (positions of nonzero terms), A024362, A154269, A338690, A271102.
Cf. enumeration of wider classes of sublattices of Z^2: A000203 (all sublattices), A350871 (all well-rounded sublattices), A002654 (all square sublattices), A001615 (all primitive sublattices), A000089 (all primitive square sublattices).
Cf. enumeration of CSLs in other lattices: A331140 (Z^4), A331139 (D_4), A331142 (A_4).

Programs

  • Mathematica
    csl[1] = 1;
    csl[n_] := With[{f = First@Transpose@FactorInteger@n}, If[Union@Mod[f, 4] == {1}, 2^Length@f, 0]];
    Array[csl, 87]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1]%4 == 1, 2, 0));} \\ Amiram Eldar, Oct 23 2023

Formula

Multiplicative with a(p^e) = 2 if p == 1 (mod 4), otherwise 0.
a(4*n+1) = A031358(n), other terms are 0.
a(n) = 2 * A024362(n) for n > 1.
Dirichlet convolution of A000089 and A154269.
Dirichlet convolution of A338690 and A271102.
From Amiram Eldar, Oct 23 2023: (Start)
Dirichlet g.f.: Product_{primes p == 1 (mod 4)} (1 + 1/p^s)/(1 - 1/p^s).
Sum_{k=1..n} a(k) = (1/Pi) * n + O(sqrt(n)*log(n)).
(both from Baake and Zeiner, 2017) (End)

A225771 Numbers that are positive integer divisors of 1 + 2*x^2 where x is a positive integer.

Original entry on oeis.org

1, 3, 9, 11, 17, 19, 27, 33, 41, 43, 51, 57, 59, 67, 73, 81, 83, 89, 97, 99, 107, 113, 121, 123, 129, 131, 137, 139, 153, 163, 171, 177, 179, 187, 193, 201, 209, 211, 219, 227, 233, 241, 243, 249, 251, 257, 267, 281, 283, 289, 291, 297, 307, 313, 321, 323
Offset: 1

Views

Author

Michael Somos, Jul 26 2013

Keywords

Comments

This sequence is case k=2, A008784 is case k=1, A004613 is case k=4 of divisors of 1 + k*x^2.
From Peter M. Chema, May 08 2017 (Start): Also gives the body diagonals of all primitive Pythagorean quadruples that define square prisms, with sides [b, b, and c] and diagonal d, such that 2*b^2 + c^2 = d^2. E.g., sides [2, 2, 1], diagonal 3 = a(2); [4, 4, 7], 9 = a(3); [6, 6, 7], 11 = a(4); [12, 12, 1], 17 = a(5); [6, 6, 17] 19 = a(6); [10, 10, 23], 27 = a(7); [20, 20, 17], 33 = a(8); [24, 24, 23], 41 = a(9)... (a subsequence of A096910) (End)
Editorial note: The above comment would be better expressed by talking about right tetrahedra (also called trirectangular tetrahedra), that is, tetrahedra with vertices (b 0 0), (0 c 0), (0 0 d) (here b=c). These are the correct generalizations of Pythagorean triangles. N. J. A. Sloane, May 08 2017
From Frank M Jackson, May 23 2017: (Start)
Starting at a(2)=3, this gives the shortest side of a primitive Heronian triangle whose perimeter is 4 times its shortest side. Aka a primitive integer Roberts triangle (see Buchholz link).
Also odd and primitive terms generated by x^2 + 2y^2 with x>0 and y>0.
Also integers with all prime divisors congruent to 1 or 3 (mod 8). (End)

Crossrefs

Programs

  • Mathematica
    Select[Range[323], False =!= Reduce[1 + 2*x^2 == # y , {x, y}, Integers] &] (* Giovanni Resta, Jul 28 2013 *)
    Select[Range[323], OddQ[#]&&Intersection[{5, 7}, Mod[Divisors[#], 8]]=={} &] (* Frank M Jackson, May 23 2017 *)
  • PARI
    {isa(n) = if( n<2, n==1, for( k=1, n\2, if( (1 + 2*k^2)%n == 0, return(1))))} /* Michael Somos, Jul 28 2013 */

Formula

a(n) integers whose prime divisors are congruent to 1 or 3 (mod 8). - Carmine Suriano, Jan 09 2015; corrected by Frank M Jackson, May 23 2017
Previous Showing 21-30 of 43 results. Next