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-10 of 16 results. Next

A091236 Nonprimes of form 4k+3.

Original entry on oeis.org

15, 27, 35, 39, 51, 55, 63, 75, 87, 91, 95, 99, 111, 115, 119, 123, 135, 143, 147, 155, 159, 171, 175, 183, 187, 195, 203, 207, 215, 219, 231, 235, 243, 247, 255, 259, 267, 275, 279, 287, 291, 295, 299, 303, 315, 319, 323, 327, 335, 339, 343, 351, 355, 363
Offset: 1

Views

Author

Labos Elemer, Feb 24 2004

Keywords

Comments

If we define f(n) to be the number of primes (counted with multiplicity) of the form 4k + 3 that divide n, then with this sequence f(a(n)) is always odd. For example, 95 is divisible by 17 and 99 is divisible by 3 (twice) and 11. - Alonso del Arte, Jan 13 2016
Complement of A002145 with respect to A004767. - Michel Marcus, Jan 17 2016
With the Jan 05 2004 Jovovic comment on A078703: The number of 1 and -1 (mod 4) divisors of a(n) are identical. Proof: each number 3 (mod 4) is trivially not a sum of two squares. The number of solutions of n as a sum of two squares is r_2(n) = 4*(d_1(n) - d_3(n)), where d_k(n) is the number of k (mod 4) divisors of n. See e.g., Grosswald, pp. 15-16 for the proof of Jacobi. - Wolfdieter Lang, Jul 29 2016

Examples

			27 = 4 * 6 + 3 = 3^3.
35 = 4 * 8 + 3 = 5 * 7.
a(8) = 75 with 2*A078703(19) = 6 divisors [1, 3, 5, 15, 25, 75], which are 1, -1, 1, -1, 1, -1 (mod 4). - _Wolfdieter Lang_, Jul 29 2016
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985.

Crossrefs

Programs

  • Maple
    A091236 := proc(n)
        option remember  ;
        local a;
        if n = 1 then
            15 ;
        else
            for a from procname(n-1)+1 do
                if not isprime(a) and modp(a,4) = 3 then
                    return a;
                end if;
            end do;
        end if;
    end proc:
    seq(A091236(n),n=1..20) ; # R. J. Mathar, Jul 20 2025
  • Mathematica
    Select[Range[1000], !PrimeQ[#] && IntegerQ[(# - 3)/4] &] (* Harvey P. Dale, Aug 16 2013 *)
    Select[4Range[100] - 1, Not[PrimeQ[#]] &] (* Alonso del Arte, Jan 13 2016 *)
  • PARI
    lista(nn) = for(n=1, nn, if(!isprime(k=4*n+3), print1(k, ", "))); \\ Altug Alkan, Jan 17 2016

A112329 Number of divisors of n if n odd, number of divisors of n/4 if n divisible by 4, otherwise 0.

Original entry on oeis.org

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

Views

Author

Michael Somos, Sep 04 2005

Keywords

Comments

First occurrence of k: 2, 1, 3, 9, 15, 64, 45, 256, 96, 144, 192, 4096, 240, ????, 768, 576, 480, ????, 720, ..., . See A246063. - Robert G. Wilson v, Oct 31 2013
a(n) is the number of pairs (u, v) in NxZ satisfying u^2-v^2=n. See Kühleitner. - Michel Marcus, Jul 30 2017
The g.f. in the form Sum_{k >= 1} x^(k^2) * (1 + x^(2*k))/(1 - x^(2*k)) = Sum_{k >= 1} x^(k^2) * (1 + x^(2*k))/(1 + x^(2*k) - 2*x^(2*k)) == Sum_{k >= 1} x^(k^2) (mod 2). It follows that a(n) is odd iff n = k^2 for some positive integer k. - Peter Bala, Jan 08 2025

Examples

			x + 2*x^3 + x^4 + 2*x^5 + 2*x^7 + 2*x^8 + 3*x^9 + 2*x^11 + 2*x^12 + ...
		

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 142.

Crossrefs

Programs

  • Maple
    f:= proc(n) if n::odd then numtheory:-tau(n) elif n mod 4 = 0 then numtheory:-tau(n/4) else 0 fi end proc;
    seq(f(i),i=1..100); # Robert Israel, Aug 24 2014
  • Mathematica
    Rest[ CoefficientList[ Series[ Sum[x^k/(1 - (-x)^k), {k, 111}], {x, 0, 110}], x]] (* Robert G. Wilson v, Sep 20 2005 *)
    Table[If[OddQ[n],DivisorSigma[0,n],If[OddQ[n/2],0,DivisorSigma[0,n/4]]],{n,100} ] (* Ray Chandler, Aug 23 2014 *)
  • PARI
    {a(n) = if( n<1, 0, (-1)^n * sumdiv( n, d, (-1)^d))}
    
  • PARI
    {a(n) = if( n<1, 0, if( n%2, numdiv(n), if( n%4, 0, numdiv(n/4))))} /* Michael Somos, Sep 02 2006 */
    
  • PARI
    d(n) = if (denominator(n)==1, numdiv(n), 0);
    a(n) = numdiv(n) - 2*d(n/2) + 2*d(n/4); \\ Michel Marcus, Jul 30 2017

Formula

Multiplicative with a(2^e) = e-1 if e>0, a(p^e) = 1+e if p>2.
G.f.: Sum_{k>0} x^k / (1 - (-x)^k) = Sum_{k>0} -(-x)^k / (1 + (-x)^k).
Möbius transform is period 4 sequence [ 1, -1, 1, 1, ...].
G.f.: Sum_{k>=1} x^(k^2) * (1+x^(2*k))/(1-x^(2*k)). - Joerg Arndt, Nov 08 2010
a(4*n + 2) = 0. a(n) = -(-1)^n * A048272(n). a(2*n - 1) = A099774(n). a(4*n) = A000005(n). a(4*n + 1) = A000005(4*n + 1). a(4*n - 1) = 2 * A078703(n).
a(n) = A094572(n) / 2. - Ray Chandler, Aug 23 2014
Bisection: a(2*k-1) = A000005(2*k-1), a(2*k) = A183063(2*k) - A001227(2*k), k >= 1. See the Hardy reference, p. 142 where a(n) = sigma^*0(n). - _Wolfdieter Lang, Jan 07 2017
a(n) = d(n) - 2*d(n/2) + 2*d(n/4) where d(n) = 0 if n is not an integer. See Kühleitner.
a(n) = Sum_{d|n} [(d mod 2) = (n/d mod 2)], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Mar 21 2022
From Amiram Eldar, Nov 29 2022: (Start)
Dirichlet g.f.: zeta(s)^2*(1 + 2^(1-2*s) - 2^(1-s)).
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (2*gamma-1)*n/2, where gamma is Euler's constant (A001620). (End)
a(n) = (-1)^n * Sum_{d|2*n} cos(d*Pi/2). - Ridouane Oudra, Sep 27 2024

A359233 Number of divisors of 5*n-1 of form 5*k+1.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Dec 22 2022

Keywords

Comments

Also number of divisors of 5*n-1 of form 5*k+4.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[5*n-1, 1 &, Mod[#, 5] == 1 &]; Array[a, 100] (* Amiram Eldar, Aug 23 2023 *)
  • PARI
    a(n) = sumdiv(5*n-1, d, d%5==1);
    
  • PARI
    a(n) = sumdiv(5*n-1, d, d%5==4);
    
  • PARI
    my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-x^(5*k-1))))
    
  • PARI
    my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^(4*k-3)/(1-x^(5*k-4))))

Formula

a(n) = A001876(5*n-1) = A001899(5*n-1).
G.f.: Sum_{k>0} x^k/(1 - x^(5*k-1)).
G.f.: Sum_{k>0} x^(4*k-3)/(1 - x^(5*k-4)).

A359211 a(n) = tau(3*n-1)/2, where tau(n) = number of divisors of n, cf. A000005.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Dec 21 2022

Keywords

Comments

Also number of divisors of 3*n-1 of form 3*k+1 (or 3*k+2).

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[0, 3*n-1]/2; Array[a, 100] (* Amiram Eldar, Dec 21 2022 *)
  • PARI
    a(n) = numdiv(3*n-1)/2;
    
  • PARI
    a(n) = sumdiv(3*n-1, d, d%3==1);
    
  • PARI
    a(n) = sumdiv(3*n-1, d, d%3==2);
    
  • PARI
    my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-x^(3*k-1))))
    
  • PARI
    my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^(2*k-1)/(1-x^(3*k-2))))

Formula

G.f.: Sum_{k>0} x^k/(1 - x^(3*k-1)).
G.f.: Sum_{k>0} x^(2*k-1)/(1 - x^(3*k-2)).
Sum_{k=1..n} a(k) = (log(n) + 2*gamma - 1 + 2*log(3))*n/3 + O(n^(1/3)*log(n)), where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 26 2022

A359305 Number of divisors of 6*n-1 of form 6*k+1.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Dec 25 2022

Keywords

Comments

Also number of divisors of 6*n-1 of form 6*k+5.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[0, 6*n - 1]/2; Array[a, 100] (* Amiram Eldar, Dec 26 2022 *)
  • PARI
    a(n) = sumdiv(6*n-1, d, d%6==1);
    
  • PARI
    a(n) = sumdiv(6*n-1, d, d%6==5);
    
  • PARI
    my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-x^(6*k-1))))
    
  • PARI
    my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^(5*k-4)/(1-x^(6*k-5))))

Formula

a(n) = A279060(6*n-1) = A319995(6*n-1).
G.f.: Sum_{k>0} x^k/(1 - x^(6*k-1)).
G.f.: Sum_{k>0} x^(5*k-4)/(1 - x^(6*k-5)).
From Amiram Eldar, Dec 26 2022: (Start)
a(n) = A000005(A016969(n-1))/2.
Sum_{k=1..n} a(k) = (log(n) + 2*gamma - 1 + 3*log(2) + 2*log(3))*n/6 + O(n^(1/3)*log(n)), where gamma is Euler's constant (A001620). (End)

A359227 Number of divisors of 4*n-3 of form 4*k+1.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Dec 22 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[4*n-3, 1 &, Mod[#, 4] == 1 &]; Array[a, 100] (* Amiram Eldar, Aug 23 2023 *)
  • PARI
    a(n) = sumdiv(4*n-3, d, d%4==1);
    
  • PARI
    my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-x^(4*k-3))))

Formula

a(n) = A001826(4*n-3).
G.f.: Sum_{k>0} x^k/(1 - x^(4*k-3)).

A364085 Expansion of Sum_{k>0} k * x^k / (1 - x^(4*k-1)).

Original entry on oeis.org

1, 2, 3, 5, 5, 6, 8, 8, 11, 11, 11, 12, 14, 17, 15, 19, 17, 18, 24, 20, 21, 23, 25, 29, 29, 26, 27, 29, 35, 32, 32, 32, 33, 46, 35, 39, 40, 38, 47, 41, 41, 42, 49, 55, 45, 47, 50, 48, 64, 50, 53, 59, 53, 65, 56, 56, 57, 64, 71, 60, 69, 67, 63, 82, 67, 66, 68, 68, 86, 79, 71, 74, 74, 89, 81, 77, 77, 78
Offset: 1

Views

Author

Seiichi Manyama, Jul 04 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[4*n - 1, # + 1 &, Mod[#, 4] == 3 &]/4; Array[a, 100] (* Amiram Eldar, Jul 05 2023 *)
  • PARI
    a(n) = sumdiv(4*n-1, d, (d%4==3)*(d+1))/4;

Formula

a(n) = (1/4) * Sum_{d | 4*n-1, d==3 (mod 4)} (d+1).
G.f.: Sum_{k>0} x^(3*k-2) / (1 - x^(4*k-3))^2.

A078714 a(n) = smallest number m which can be obtained in n ways by subtracting twice a triangular number from a perfect square.

Original entry on oeis.org

1, 4, 16, 34, 142, 79, 1276, 289, 394, 709, 103336, 1024, 930022, 6379, 3544, 2599, 75331762, 5119, 677985856, 9214, 31894, 516679, 54916854316, 12994, 88594, 4650109, 30319, 82924, 40034386796182, 46069, 360309481165636, 33784, 2583394, 376658809, 797344
Offset: 1

Views

Author

R. L. Coffman, K. W. McLaughlin and R. J. Dawson (robert.l.coffman(AT)uwrf.edu), Dec 19 2002

Keywords

Comments

The minimum number m (denoted by LSDT(n)) which can be represented in n different ways as a symmetric unimodal consecutive integer sequence (e.g., 6+7+8+7+6) that sums to the integer m. More precisely, n is the number of ways to arrange m objects into symmetrically-placed, congruent isosceles trapezoids adjoined at overlapping largest bases and m is the minimum number of objects that allows this number of arrangements.
a(23)-a(50) are ?, 12994, 88594, 4650109, 30319, 82924, ?, 46069, ?, 33784, 2583394, 376658809, 797344, 78829, ?, ?, 23250544, 148129, ?, 414619, ?, 6716824, 272869, ?, ?, 168919, 19933594, 1151719. - Robert G. Wilson v, Dec 24 2002

Examples

			Let SDT(n) = the number, k, of symmetric double trapezoidal arrangements of n objects, then SDT(34) = 4, since we have 34 or 11+12+11 or 6+7+8+7+6 or 2+3+4+5+6+5+4+3+2. For SDT(n) = 4, we have n = 34 or 49 or 58 or 64 ..., so that the least value of SDT(n)=4 is LSDT(4) = 34. Also 4*34 - 1 = 135 = (3^3)*(5^1) so that r1=3 and r2=1 (p1=3 and p2=5), resulting in SDT(34) = (3+1)*(1+1)/2 = 4 and 34 is the least value of n which satisfies 4*n-1 so that one half the number of odd divisors equals 4.
		

Crossrefs

Programs

  • Mathematica
    The following function determines the number of ways, SDT(n), of arranging n identical objects into symmetric double trapezoidal arrangements: SDT[n_] := (Times @@ Cases[FactorInteger[4 n - 1], {p_, r_} -> r + 1])/2 The program below computes the first few terms of the sequence LSDT(k)=min{n:SDT(n)=k}. The output is in the form {{1, LSDT(1)}, {2, LSDT(2)}, {3, LSDT(3)}, ...}: Union[Sort[{SDT[ # ], #} & /@ Range[1, 100000]], SameTest -> (#1[[1]] == #2[[1]] &)]

Formula

LSDT(k)={min n: SDT(n)=k}, where SDT(n)=((r1+1)*(r2+1)*...)/2 and ((p1^r1)*(p2^r2)*...) is the factorization of 4n-1 into (odd) primes.
a(n) = (A204086(n) + 1)/4. - Ray Chandler, Jan 10 2012
For odd prime p, a(p) = (3^(p-1)*7 + 1)/4.

Extensions

Missing terms noted in Comments and b-file from Ray Chandler, Jan 10 2012

A359290 Number of divisors of 4*n-2 of form 4*k+3.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Dec 24 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Count[Divisors[4 n-2],?(IntegerQ[(#-3)/4]&)],{n,100}] (* _Harvey P. Dale, May 09 2023 *)
    a[n_] := DivisorSum[4*n-2, 1 &, Mod[#, 4] == 3 &]; Array[a, 100] (* Amiram Eldar, Aug 16 2023 *)
  • PARI
    a(n) = sumdiv(4*n-2, d, d%4==3);
    
  • PARI
    my(N=100, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, x^(2*k)/(1-x^(4*k-1)))))
    
  • PARI
    my(N=100, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, x^(3*k-1)/(1-x^(4*k-2)))))

Formula

a(n) = A001842(4*n-2).
G.f.: Sum_{k>0} x^(2*k)/(1 - x^(4*k-1)).
G.f.: Sum_{k>0} x^(3*k-1)/(1 - x^(4*k-2)).

A364082 Expansion of Sum_{k>0} k * x^(3*k-2) / (1 - x^(4*k-3)).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 4, 1, 3, 5, 1, 1, 6, 3, 1, 10, 1, 1, 10, 1, 1, 9, 5, 3, 13, 1, 1, 11, 3, 6, 12, 1, 1, 18, 1, 5, 20, 1, 3, 15, 1, 1, 19, 10, 1, 17, 6, 1, 24, 1, 9, 22, 1, 3, 20, 1, 1, 36, 3, 1, 25, 5, 1, 30, 11, 1, 24, 1, 10, 28, 1, 12, 26, 3, 5, 27, 1, 1, 51, 9, 6, 29, 1, 3, 30, 14, 1, 38, 3, 1, 41, 1, 15, 42, 1, 1
Offset: 1

Views

Author

Seiichi Manyama, Jul 04 2023

Keywords

Crossrefs

Cf. A078703.

Programs

  • Mathematica
    a[n_] := DivisorSum[4*n - 1, # + 3 &, Mod[#, 4] == 1 &]/4; Array[a, 100] (* Amiram Eldar, Jul 05 2023 *)
  • PARI
    a(n) = sumdiv(4*n-1, d, (d%4==1)*(d+3))/4;

Formula

a(n) = (1/4) * Sum_{d | 4*n-1, d==1 (mod 4)} (d+3).
G.f.: Sum_{k>0} x^k / (1 - x^(4*k-1))^2.
Showing 1-10 of 16 results. Next