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.

A055045 Numbers of the form 4^i*(8*j+5).

Original entry on oeis.org

5, 13, 20, 21, 29, 37, 45, 52, 53, 61, 69, 77, 80, 84, 85, 93, 101, 109, 116, 117, 125, 133, 141, 148, 149, 157, 165, 173, 180, 181, 189, 197, 205, 208, 212, 213, 221, 229, 237, 244, 245, 253, 261, 269, 276, 277, 285, 293, 301, 308, 309, 317, 320, 325, 333, 336, 340, 341
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2000

Keywords

Comments

Numbers not of the form x^2+2y^2+6z^2.

Crossrefs

Programs

  • Haskell
    a055045 n = a055045_list !! (n-1)
    a055045_list = filter ((== 5) . (flip mod 8) . f) [1..] where
       f x = if r == 0 then f x' else x  where (x', r) = divMod x 4
    -- Reinhard Zumkeller, Jan 02 2014
    
  • Mathematica
    A055045Q[k_] := Mod[k/4^IntegerExponent[k, 4], 8] == 5;
    Select[Range[500], A055045Q] (* Paolo Xausa, Mar 20 2025 *)
  • PARI
    is(n)=n/=4^valuation(n,4); n%8==5 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
    
  • Python
    from itertools import count, islice
    def A055045_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:not (m:=(~n&n-1).bit_length())&1 and (n>>m)&7==5, count(max(startvalue, 1)))
    A055045_list = list(islice(A055045_gen(), 30)) # Chai Wah Wu, Jul 09 2022
    
  • Python
    def A055045(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(((x>>(i<<1))-5>>3)+1 for i in range(x.bit_length()>>1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 6n + O(log n). - Charles R Greathouse IV, Dec 19 2013
a(n) = A055042(n)/2. - Chai Wah Wu, Mar 19 2025

A203322 Numbers not of the form x^2+2*y^3+3*z^4 for nonnegative x, y, z.

Original entry on oeis.org

8, 10, 13, 15, 22, 24, 26, 29, 31, 33, 34, 37, 40, 42, 43, 45, 46, 47, 53, 56, 60, 62, 71, 72, 74, 76, 77, 78, 85, 87, 88, 91, 92, 94, 95, 96, 98, 101, 104, 107, 108, 109, 110, 115, 117, 120, 122, 125, 130, 133, 134, 136, 139, 141, 142, 143, 152, 155, 158, 159, 161, 162, 165, 168, 170, 173, 179, 181, 182, 184, 186, 187, 189
Offset: 1

Views

Author

N. J. A. Sloane, Jan 20 2012

Keywords

Comments

Suggested by A055042.

Crossrefs

Cf. A055042.

Programs

  • Maple
    N:= 1000: # for terms <= N
    E1:= {seq(3*z^4,z=0..floor((N/3)^(1/4)))}:
    E2:= map(t -> seq(t+2*y^3,y=0..floor(((N-t)/2)^(1/3))), E1):
    E3:= map(t -> seq(t+x^2,x=0..floor(sqrt(N-t))), E2):
    sort(convert({$1..N} minus E3,list)); # Robert Israel, Aug 17 2020

A366091 a(n) is the number of ways to write n = i^2 + 2*j^2 + 3*k^2 with i,j,k >= 0.

Original entry on oeis.org

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

Views

Author

Robert Israel, Sep 28 2023

Keywords

Examples

			a(9) = 3 because 9 = 3^2 + 2*0^2 + 3*0^2 = 1^2 + 2*2^2 + 3*0^2 = 2^2 + 2*1^2 + 3*1^2.
		

Crossrefs

Cf. A028594 (allows any integer i,j,k), A055042 (a(n) = 0)

Programs

  • Maple
    g:= (1+JacobiTheta3(0,z))*(1+JacobiTheta3(0,z^2))*(1+JacobiTheta3(0,z^3))/8:
    S:= series(g,z,101):
    seq(coeff(S,z,j),j=0..100);
  • Python
    from itertools import count
    from sympy.ntheory.primetest import is_square
    def A366091(n):
        c = 0
        for k in count(0):
            if (a:=3*k**2)>n:
                break
            for j in count(0):
                if (b:=a+(j**2<<1))>n:
                    break
                if is_square(n-b):
                    c += 1
        return c # Chai Wah Wu, Sep 29 2023

Formula

G.f. (1 + theta_3(0,z)) * (1 + theta_3(0,z^2)) * (1 + theta_3(0,z^3))/8 where theta_3 is a Jacobi theta function.

A370267 Numbers with an even number of prime factors not of the form 8m+-1 (counting repetitions).

Original entry on oeis.org

1, 4, 6, 7, 9, 10, 15, 16, 17, 22, 23, 24, 25, 26, 28, 31, 33, 36, 38, 39, 40, 41, 42, 47, 49, 54, 55, 57, 58, 60, 63, 64, 65, 68, 70, 71, 73, 74, 79, 81, 86, 87, 88, 89, 90, 92, 95, 96, 97, 100, 102, 103, 104, 105, 106, 111, 112, 113, 118, 119, 121, 122, 124, 127, 129
Offset: 1

Views

Author

Peter Munn, Feb 13 2024

Keywords

Comments

Construction by subgroup generation: (Start)
The set of numbers congruent to 1 modulo 8 (A017077) contains all the odd squares and generates a subgroup of the positive rational numbers (under multiplication) that contains no additional integers. The subgroup has an infinite number of cosets. The rest of the construction process extends the subgroup, reducing the number of cosets to 2, by choosing additional generators that are semiprime.
First we extend the subgroup to include all nonzero integer squares. As we already have the odd squares, we need only add 4, the square of the smallest prime, as a generator. The extended subgroup has only 8 cosets and its integer members are listed in A234000. To achieve a subgroup with 2 cosets we now add squarefree semiprime generators. The 2 smallest, 6 and 10, suffice.
The resulting subgroup has this sequence's terms as its integer members.
(End)
The equivalent process starting with numbers congruent to 1 modulo 3 (or 1 modulo 6) produces A189715. If we take its intersection with this sequence we get A370268, which starts with the first 72 nonzero numbers of the form x^2 + 6y^2 (see A002481). Similarly, if we start with numbers congruent to 1 modulo 5 (or 1 modulo 10) and take the resulting set's intersection with this sequence we get a set starting with the first 32 nonzero numbers of the form x^2 - 10y^2 (see A242664).
The construction process leads to a number of properties:
- The sequence is closed under multiplication and all integer ratios between terms are in the sequence.
- The sequence and its complement have the property that the terms of one can be generated by halving the even terms of the other. Each has asymptotic density 1/2.
Numbers whose squarefree part is congruent to {1,7} mod 8 or {6,10} mod 16.

Examples

			7 is prime, so 7 is its only prime factor, which has the form 8m-1. So 7 has an even number (zero) of prime factors not of the form 8m+-1, and therefore is in the sequence. In terms of the subgroup generators described at the start of the comments, (13*8+1) * 4 / (6*10) = 105 * 4/60 = 7.
110 = 2 * 5 * 11, so it has 3 prime factors and all 3 do not have the form 8m+-1. 3 is odd, so 110 is not in the sequence.
		

Crossrefs

Disjoint union of A004215, A055042, A055043 and A234000.
See the comments for the relationships with A002481, A017077, A189715, A242664, A370268.
Cf. A042999 (primes), A059897.

Programs

  • PARI
    isok(k) = {c = core(k); c%8 == 1 || c%8 == 7 || c%16 == 6 || c%16 == 10}
    
  • Python
    def A370267(n):
        def f(x): return n+x-sum(((y:=x>>(i<<1))-7>>3)+(y-1>>3)+2 for i in range((x.bit_length()>>1)+1))-sum(((z:=x>>(i<<1)+1)-5>>3)+(z-3>>3)+2 for i in range(x.bit_length()-1>>1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Mar 19 2025

Formula

{a(n) : n >= 1} = {A059897(i,j) : i in A234000, j in {1, 6, 10, 15}}.
Showing 1-4 of 4 results.