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.

User: Griffin N. Macris

Griffin N. Macris's wiki page.

Griffin N. Macris has authored 5 sequences.

A339746 Positive integers of the form 2^i*3^j*k, gcd(k,6)=1, and i == j (mod 3).

Original entry on oeis.org

1, 5, 6, 7, 8, 11, 13, 17, 19, 23, 25, 27, 29, 30, 31, 35, 36, 37, 40, 41, 42, 43, 47, 48, 49, 53, 55, 56, 59, 61, 64, 65, 66, 67, 71, 73, 77, 78, 79, 83, 85, 88, 89, 91, 95, 97, 101, 102, 103, 104, 107, 109, 113, 114, 115, 119, 121, 125, 127, 131, 133, 135
Offset: 1

Author

Griffin N. Macris, Dec 15 2020

Keywords

Comments

From Peter Munn, Mar 16 2021: (Start)
The positive integers in the multiplicative subgroup of the positive rationals generated by 8, 6, and A215848 (primes greater than 3).
This subgroup, denoted H, has two cosets: 2H = (1/3)H and 3H = (1/2)H. It follows that the sequence is one part of a 3-part partition of the positive integers with the property that each part's terms are half the even terms of one of the other parts and also one third of the multiples of 3 in the remaining part.
(End)
Positions of multiples of 3 in A276085 (and in A276075). Because A276085 is completely additive, this is closed under multiplication: if m and n are in the sequence then so is m*n. - Antti Karttunen, May 27 2024
The coset sequences mentioned in Peter Munn's comment above are A373261 and A373262. - Antti Karttunen, Jun 04 2024

Crossrefs

Sequences of positive integers in a multiplicative subgroup of positive rationals generated by a set S and A215848: S={}: A007310, S={6}: A064615, S={3,4}: A003159, S={2,9}: A007417, S={4,6}: A036668, S={3,8}: A191257, S={4,9}: A339690, S={6,8}: this sequence.
Positions of 0's in A373153, positions of multiples of 3 in A276085 and in A372576.
Cf. A372573 (characteristic function), A373261, A373262.
Sequences giving positions of multiples of k in A276085, for k=2, 3, 4, 5, 8, 27, 3125: A003159, this sequence, A369002, A373140, A373138, A377872, A377878.
Cf. also A332820, A373992, A383288.

Programs

  • Maple
    N:= 1000: # for terms <= N
    R:= {}:
    for k1 from 0 to floor(N/6) do
      for k0 in [1,5] do
        k:= k0 + 6*k1;
        for j from 0 while 3^j*k <= N do
          for i from (j mod 3) by 3 do
            x:= 2^i * 3^j * k;
            if x > N then break fi;
            R:= R union {x}
    od od od od:
    sort(convert(R,list)); # Robert Israel, Apr 08 2021
  • Mathematica
    Select[Range[130], Mod[IntegerExponent[#, 2] - IntegerExponent[#, 3], 3] == 0 &]
  • PARI
    isA339746 = A372573; \\ Antti Karttunen, Jun 04 2024
    
  • Python
    from sympy import factorint
    def ok(n):
      f = factorint(n, limit=4)
      i, j = 0 if 2 not in f else f[2], 0 if 3 not in f else f[3]
      return (i-j)%3 == 0
    def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
    print(aupto(200)) # Michael S. Branicky, Mar 26 2021
    
  • Python
    from itertools import count
    def A339746(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):
            c = n+x
            for i in range(x.bit_length()+1):
                i2 = 1<x:
                        break
                    m = x//k
                    c -= (m-1)//6+(m-5)//6+2
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 12 2025

Formula

a(n) ~ (91/43)*n.

A339690 Positive integers of the form 4^i*9^j*k with gcd(k,6)=1.

Original entry on oeis.org

1, 4, 5, 7, 9, 11, 13, 16, 17, 19, 20, 23, 25, 28, 29, 31, 35, 36, 37, 41, 43, 44, 45, 47, 49, 52, 53, 55, 59, 61, 63, 64, 65, 67, 68, 71, 73, 76, 77, 79, 80, 81, 83, 85, 89, 91, 92, 95, 97, 99, 100, 101, 103, 107, 109, 112, 113, 115, 116, 117, 119, 121
Offset: 1

Author

Griffin N. Macris, Dec 13 2020, and Peter Munn, Feb 03 2021

Keywords

Comments

Positive integers that survive sieving by the rule: if m appears then 2m, 3m and 6m do not.
Numbers whose squarefree part is congruent to 1 or 5 modulo 6.
Closed under multiplication.
Term by term, the sequence is one half of its complement within A007417, one third of its complement within A003159, and one sixth of its complement within A036668.
Asymptotic density is 1/2.
The set of all a(n) has maximal lower density (1/2) among sets S such that S, 2S, and 3S are disjoint.
Numbers which do not have 2 or 3 in their Fermi-Dirac factorization. Thus each term is a product of a unique subset of A050376 \ {2,3}.
It follows that the sequence is closed with respect to the commutative binary operation A059897(.,.), forming a subgroup of the positive integers considered as a group under A059897. It is the subgroup generated by A050376 \ {2,3}. A003159, A007417 and A036668 correspond to the nontrivial subgroups of its quotient group. It is the lexicographically earliest ordered transversal of the subgroup {1,2,3,6}, which in ordered form is the lexicographically earliest subgroup of order 4.

Examples

			Numbers are removed by the sieve only due to the presence of a smaller number, so 1 is in the sequence as the smallest positive integer. The sieve removes 2, as it is twice 1, which is in the sequence; so 2 is not in the sequence. The sieve removes 3, as it is three times 1, which is in the sequence, so 3 is not in the sequence. There are no integers m for which 3m = 4 or 6m = 4; 2m = 4 for m = 2, but 2 is not in the sequence; so the sieve does not remove 4, so 4 is in the sequence.
		

Crossrefs

Cf. A050376, A059897, A307150, A339746, A372574 (characteristic function).
Ordered first quadrisection of A052330.
Intersection of any 2 of A003159, A007417 and A036668.
A329575 divided by 3.

Programs

  • Mathematica
    Select[Range[117], EvenQ[IntegerExponent[#, 2]] && EvenQ[IntegerExponent[#, 3]] &]
    f[p_, e_] := p^Mod[e, 2]; core[n_] := Times @@ f @@@ FactorInteger[n]; Select[Range[121], CoprimeQ[core[#], 6] &] (* Amiram Eldar, Feb 06 2021 *)
  • PARI
    isok(m) = core(m) % 6 == 1 || core(m) % 6 == 5;
    
  • Python
    from itertools import count
    from sympy import integer_log
    def A339690(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):
            c = n+x
            for i in range(integer_log(x,9)[0]+1):
                i2 = 9**i
                for j in count(0,2):
                    k = i2<x:
                        break
                    m = x//k
                    c -= (m-1)//6+(m-5)//6+2
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

{a(n) : n >= 1} = {m : A307150(m) = 6m, m >= 0}.
{a(n) : n >= 1} = {k : k = A052330(4m), m >= 0}.
A329575(n) = a(n) * 3.
{A036668(n) : n >= 0} = {a(n) : n >= 1} U {6 * a(n) : n >= 1}.
{A003159(n) : n >= 1} = {a(n) : n >= 1} U {3 * a(n) : n >= 1}.
{A007417(n) : n >= 1} = {a(n) : n >= 1} U {2 * a(n) : n >= 1}.
a(n) ~ 2n.

A265826 a(0) = 1, a(n) = Sum_{k=1..n} a(n-k)*ceiling(sin(k)).

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 24, 45, 84, 157, 293, 547, 1021, 1906, 3558, 6642, 12399, 23146, 43208, 80659, 150571, 281080, 524709, 979506, 1828503, 3413376, 6371955, 11894912, 22204949, 41451316, 77379669, 144449290, 269652192, 503375992, 939682290
Offset: 0

Author

Griffin N. Macris, Apr 06 2016

Keywords

Comments

It appears that a(n) <= A088353(n). They are identical until n=11 where a(11) = 547, but A088353(n) = 548.
It also appears that a(n) <= A059633(n+2). They are identical until n=25 where a(25) = 3413376, but A059633(27) = 3413377.

Examples

			a(4) = 1*ceiling(sin(4)) + 1*ceiling(sin(3)) + 2*ceiling(sin(2)) + 4*ceiling(sin(1)) = 1*0 + 1*1 + 2*1 + 4*1 = 7.
		

Programs

  • Java
    int limit = 500; //limit index, can be changed for more terms
    BigInteger[] n = new BigInteger[limit];
    n[0] = BigInteger.ONE;
    System.out.println("0 1");
    for ( int i = 1; i < n.length; i++ ) {
       n[i] = BigInteger.ZERO;
       for(int k = 1; k <= i; k++) {
          n[i] = n[i].add(n[i-k].multiply(BigInteger.valueOf((long) Math.ceil(Math.sin(k)))));
       }
       System.out.println(i+" "+n[i]);
    }
  • Mathematica
    A[0] := 1
    A[n_] := A[n] = If[n <= 0, 0, Sum[A[n - k]Ceiling[Sin[k]], {k, 1, n}]]

Formula

a(0) = 1
a(n) = Sum_{k=1..n} a(n-k)*ceiling(sin(k)).

A270783 Numbers of the form p^2 + q^2 + r^2 + s^2 = a^2 + b^2 + c^2 for some primes p, q, r, and s and some integers a, b, and c.

Original entry on oeis.org

16, 21, 26, 36, 37, 42, 52, 58, 61, 66, 68, 76, 82, 84, 100, 106, 108, 116, 132, 133, 138, 148, 154, 164, 172, 178, 180, 181, 186, 196, 202, 204, 212, 226, 228, 236, 244, 250, 260, 268, 276, 292, 298, 300, 301, 306, 308, 322, 324, 332, 340
Offset: 1

Author

Griffin N. Macris, Mar 23 2016

Keywords

Comments

This sequence is infinite since 4p^2 = 0^2 + 0^2 + (2p)^2 is in the sequence for all primes p.
A069262 is a subsequence.
It appears at first that the squares of A139544(n) for n >= 3 are a subsequence. n=22 is the first counterexample, where A139544(22)^2 = 6084 is not an element of this sequence.

Examples

			a(1) = 16 = 2^2 + 2^2 + 2^2 + 2^2 = 0^2 + 0^2 + 4^2.
		

Crossrefs

Difference of A214515 and A270781.
Difference of A214515 and A004215.

Programs

  • Sage
    n=340 #change for more terms
    P=prime_range(1,ceil(sqrt(n)))
    S=cartesian_product_iterator([P,P,P,P])
    A=list(Set([sum(i^2 for i in y) for y in S if sum(i^2 for i in y)<=n]))
    A.sort()
    T=[sum(i^2 for i in y) for y in cartesian_product_iterator([[0..ceil(sqrt(n))],[0..ceil(sqrt(n))],[0..ceil(sqrt(n))]])]
    [x for x in A if x in T] # Tom Edgar, Mar 24 2016

A270781 Numbers n with the property that n is both of the form p^2 + q^2 + r^2 + s^2 for some primes p, q, r, and s, and not of the form a^2 + b^2 + c^2 for any integers a, b, and c.

Original entry on oeis.org

31, 47, 63, 71, 79, 87, 92, 103, 111, 124, 127, 143, 151, 156, 159, 175, 183, 188, 191, 199, 207, 220, 223, 231, 247, 252, 255, 271, 295, 303, 311, 316, 319, 327, 343, 348, 351, 367, 383, 391, 399, 412, 415, 423, 439, 444, 463, 471, 476, 487
Offset: 1

Author

Griffin N. Macris, Mar 23 2016

Keywords

Comments

This sequence can easily be shown to be infinite. Take p, q, r equal and congruent to 1 mod 16, and s = 5. Then, because p = 1+16k, n = 28 + 96k + 768k^2, and n = 4*(7+8*m) for m = 3k+24k^2. Then, following from Legendre's three-square theorem, n cannot be written as a^2 + b^2 + c^2 for any a, b, c in the integers. Then, because there are infinitely many primes of the form p = 1+16k, this sequence is infinite.
It appears at first that all Mersenne numbers (A000225) are included in this sequence. However, this is not the case. The first counterexample is 262143 = 2^18 - 1. The next are 4194303 = 2^22 - 1 and 16777215 = 2^24 - 1.

Examples

			31 = 2^2 + 3^2 + 3^2 + 3^2, and, according to Legendre's three-square theorem, 31 cannot be expressed as the sum of three squares, so 31 is a term.
		

Crossrefs

Cf. A000225.
Intersection of A214515 and A004215.
Difference of A214515 and A270783.

Programs

  • Sage
    n=487 #change for more terms
    P=prime_range(1,ceil(sqrt(n)))
    S=cartesian_product_iterator([P,P,P,P])
    A=list(Set([sum(i^2 for i in y) for y in S if sum(i^2 for i in y)<=n]))
    A.sort()
    T=[sum(i^2 for i in y) for y in cartesian_product_iterator([[0..ceil(sqrt(n))],[0..ceil(sqrt(n))],[0..ceil(sqrt(n))]])]
    [x for x in A if not(x in T)] # Tom Edgar, Mar 24 2016