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-6 of 6 results.

A047235 Numbers that are congruent to {2, 4} mod 6.

Original entry on oeis.org

2, 4, 8, 10, 14, 16, 20, 22, 26, 28, 32, 34, 38, 40, 44, 46, 50, 52, 56, 58, 62, 64, 68, 70, 74, 76, 80, 82, 86, 88, 92, 94, 98, 100, 104, 106, 110, 112, 116, 118, 122, 124, 128, 130, 134, 136, 140, 142, 146, 148, 152, 154, 158, 160, 164, 166, 170, 172, 176, 178, 182, 184, 188, 190, 194, 196, 200, 202, 206
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 19 ).
Complement of A047273; A093719(a(n)) = 0. - Reinhard Zumkeller, Oct 01 2008
One could prefix an initial term "1" (or not) and define this sequence through a(n+1) = a(n) + (a(n) mod 6). See A001651 for the analog with 3, A235700 (with 5), A047350 (with 7), A007612 (with 9) and A102039 (with 10). Using 4 or 8 yields a constant sequence from that term on. - M. F. Hasler, Jan 14 2014
Nonnegative m such that m^2/6 + 1/3 is an integer. - Bruno Berselli, Apr 13 2017
Numbers divisible by 2 but not by 3. - David James Sycamore, Apr 04 2018
Numbers k for which A276086(k) is of the form 6m+3. - Antti Karttunen, Dec 03 2022

Crossrefs

Cf. A020760, A020832, A093719, A047273 (complement), A120325 (characteristic function).
Equals 2*A001651.
Cf. A007310 ((6*n+(-1)^n-3)/2). - Bruno Berselli, Jun 24 2010
Positions of 3's in A053669 and in A358840.

Programs

  • Magma
    [ n eq 1 select 2 else Self(n-1)+2*(1+n mod 2): n in [1..70] ]; // Klaus Brockhaus, Dec 13 2008
    
  • Maple
    seq(6*floor((n+1)/2) + 3 + (-1)^n, n=1..67); # Gary Detlefs, Mar 02 2010
  • Mathematica
    Flatten[Table[{6n - 4, 6n - 2}, {n, 40}]] (* Alonso del Arte, Oct 27 2014 *)
  • PARI
    a(n)=(n-1)\2*6+3+(-1)^n \\ Charles R Greathouse IV, Jul 01 2013
    
  • PARI
    first(n) = my(v = vector(n, i, 3*i - 1)); forstep(i = 2, n, 2, v[i]--); v \\ David A. Corneth, Oct 20 2017

Formula

a(n) = 2*A001651(n).
n such that phi(3*n) = phi(2*n). - Benoit Cloitre, Aug 06 2003
G.f.: 2*x*(1 + x + x^2)/((1 + x)*(1 - x)^2). a(n) = 3*n - 3/2 - (-1)^n/2. - R. J. Mathar, Nov 22 2008
a(n) = 3*n + 5..n odd, 3*n + 4..n even a(n) = 6*floor((n+1)/2) + 3 + (-1)^n. - Gary Detlefs, Mar 02 2010
a(n) = 6*n - a(n-1) - 6 (with a(1) = 2). - Vincenzo Librandi, Aug 05 2010
a(n+1) = a(n) + (a(n) mod 6). - M. F. Hasler, Jan 14 2014
Sum_{n>=1} 1/a(n)^2 = Pi^2/27. - Dimitris Valianatos, Oct 10 2017
a(n) = (6*n - (-1)^n - 3)/2. - Ammar Khatab, Aug 23 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)). - Amiram Eldar, Dec 11 2021
E.g.f.: 2 + ((6*x - 3)*exp(x) - exp(-x))/2. - David Lovler, Aug 25 2022
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 2/sqrt(3) (10 * A020832).
Product_{n>=1} (1 + (-1)^n/a(n)) = 1/sqrt(3) (A020760). (End)

A102039 a(n) = a(n-1) + last digit of a(n-1), starting at 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 22, 24, 28, 36, 42, 44, 48, 56, 62, 64, 68, 76, 82, 84, 88, 96, 102, 104, 108, 116, 122, 124, 128, 136, 142, 144, 148, 156, 162, 164, 168, 176, 182, 184, 188, 196, 202, 204, 208, 216, 222, 224, 228, 236, 242, 244, 248, 256, 262, 264, 268, 276, 282
Offset: 1

Views

Author

Samantha Stones (devilsdaughter2000(AT)hotmail.com), Dec 25 2004

Keywords

Comments

Sequence A001651 is the "base 3" version. In base 4 this rule leads to (1,2,4,4,4...), in base 5 to (1,2,4,8,11,12,14,18,21,22,24,28...) = A235700. - M. F. Hasler, Jan 14 2014
This and the following sequences (none of which is "base"!) could all be defined by a(1) = 1 and a(n+1) = a(n) + (a(n) mod b) with different values of b: A001651 (b=3), A235700 (b=5), A047235 (b=6), A047350 (b=7), A007612 (b=9). Using b=4 or b=8 yields a constant sequence from that term on. - M. F. Hasler, Jan 15 2014

Examples

			28 + 8 = 36, 36 + 6 = 42.
		

Crossrefs

Apart from initial term, same as A002081.

Programs

  • Mathematica
    LinearRecurrence[{2,-2,2,-1},{1,2,4,8,16},60] (* Harvey P. Dale, Jul 02 2022 *)
  • PARI
    print1(a=1);for(i=1,99,print1(","a+=a%10)) \\ M. F. Hasler, Jan 14 2014
    
  • PARI
    Vec(x*(5*x^4+2*x^3+2*x^2+1)/((x-1)^2*(x^2+1)) + O(x^100)) \\ Colin Barker, Sep 20 2014
    
  • PARI
    a(n) = if(n==1, 1, (-10-(1-I/2)*(-I)^n-(1+I/2)*I^n+5*n)) \\ Colin Barker, Oct 18 2015

Formula

a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>5. G.f.: x*(5*x^4+2*x^3+2*x^2+1) / ((x-1)^2*(x^2+1)). - Colin Barker, Sep 20 2014
a(n) = (-10 - (1-i/2)*(-i)^n - (1+i/2)*i^n + 5*n) for n>1, where i = sqrt(-1). - Colin Barker, Oct 18 2015

A233999 Values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 7 raised to an odd power.

Original entry on oeis.org

1, 2, 4, 8, 9, 11, 15, 16, 18, 22, 23, 25, 29, 30, 32, 36, 37, 39, 43, 44, 46, 49, 50, 51, 53, 57, 58, 60, 64, 65, 67, 71, 72, 74, 78, 79, 81, 85, 86, 88, 92, 93, 95, 98, 99, 100, 102, 106, 107, 109, 113, 114, 116, 120, 121, 123, 127, 128, 130, 134, 135, 137, 141, 142, 144, 148, 149
Offset: 1

Views

Author

V. Raman, Dec 18 2013

Keywords

Comments

Equivalently, numbers of the form 49^n*(7m+1), 49^n*(7m+2), or 49^n*(7m+4). [Corrected by Charles R Greathouse IV, Jan 12 2017]
From Peter Munn, Feb 08 2024: (Start)
Numbers whose squarefree part is congruent to a (nonzero) quadratic residue modulo 7.
The integers in a subgroup of the positive rationals under multiplication. As such the sequence is closed under multiplication and - where the result is an integer - under division. The subgroup has index 4 and is generated by the primes congruent to a quadratic residue (1, 2 or 4) modulo 7, the square of 7, and 3 times the other primes; that is a generator corresponding to each prime: 2, 3*3, 3*5, 7^2, 11, 3*13, 3*17, 3*19, 23, 29, 3*31, ... .
(End)

Crossrefs

Numbers whose squarefree part is congruent to a coprime quadratic residue modulo k: A003159 (k=2), A055047 (k=3), A277549 (k=4), A352272 (k=6), A234000 (k=8), A334832 (k=24).
First differs from A047350 by including 49.

Programs

  • PARI
    is(n)=n/=49^valuation(n, 49); n%7==1||n%7==2||n%7==4 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
    
  • PARI
    is_A233999(n)=bittest(22,n/49^valuation(n, 49)%7) \\ - M. F. Hasler, Jan 02 2014
    
  • PARI
    list(lim)=my(v=List(),t,u); forstep(k=1,lim\=1,[1,2,4], listput(v,k)); for(e=1,logint(lim,49), u=49^e; for(i=1,#v, t=u*v[i]; if(t>lim, break); listput(v,t))); Set(v) \\ Charles R Greathouse IV, Jan 12 2017
    
  • Python
    from sympy import integer_log
    def A233999(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,49)[0]+1):
                m = x//49**i
                c -= (m-1)//7+(m-2)//7+(m-4)//7+3
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 16n/7 + O(log n). - Charles R Greathouse IV, Jan 12 2017

A235700 a(n+1) = a(n) + (a(n) mod 5), a(1)=1.

Original entry on oeis.org

1, 2, 4, 8, 11, 12, 14, 18, 21, 22, 24, 28, 31, 32, 34, 38, 41, 42, 44, 48, 51, 52, 54, 58, 61, 62, 64, 68, 71, 72, 74, 78, 81, 82, 84, 88, 91, 92, 94, 98, 101, 102, 104, 108, 111, 112, 114, 118, 121, 122, 124, 128, 131, 132, 134, 138, 141, 142, 144, 148, 151, 152, 154, 158, 161, 162, 164, 168, 171, 172, 174, 178, 181, 182, 184, 188, 191
Offset: 1

Views

Author

M. F. Hasler, Jan 14 2014

Keywords

Comments

Although the present sequence has not been thought of via "writing a(n) in base b", this could be seen as "base 5" version of A102039 (base 10) and A001651 (base 3), A047235 (base 6), A047350 (base 7) and A007612 (base 9). For 4 or 8 one would get a sequence constant from that (3rd resp. 4th) term on.

Crossrefs

Programs

  • Mathematica
    NestList[#+Mod[#,5]&,1,80] (* Harvey P. Dale, Oct 20 2024 *)
  • PARI
    is_A235700(n) = bittest(278,n%10) \\ 278=2^1+2^2+2^4+2^8
    
  • PARI
    A235700 = n -> 2^((n-1)%4)+(n-1)\4*10
    
  • PARI
    print1(a=1);for(i=1,99,print1(","a+=a%5))
    
  • PARI
    Vec(x*(2*x^3+2*x^2+1)/((x-1)^2*(x^2+1)) + O(x^100)) \\ Colin Barker, Jan 16 2014

Formula

a(n) = 2^(n-1 mod 4) + 10*floor((n-1)/4).
From Colin Barker, Jan 16 2014: (Start)
a(n) = (-10+(1+2*i)*(-i)^n+(1-2*i)*i^n+10*n)/4 where i=sqrt(-1).
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4).
G.f.: x*(2*x^3+2*x^2+1) / ((x-1)^2*(x^2+1)). (End)
E.g.f.: (4 + 5*exp(x)*(x - 1) + cos(x) + 2*sin(x))/2. - Stefano Spezia, Feb 22 2025

A302588 a(n) = a(n-3) + 7*(n-2), a(0)=1, a(1)=2, a(2)=4.

Original entry on oeis.org

1, 2, 4, 8, 16, 25, 36, 51, 67, 85, 107, 130, 155, 184, 214, 246, 282, 319, 358, 401, 445, 491, 541, 592, 645, 702, 760, 820, 884, 949, 1016, 1087, 1159, 1233, 1311, 1390, 1471, 1556, 1642, 1730, 1822, 1915, 2010
Offset: 0

Views

Author

Paul Curtz, Jul 17 2018

Keywords

Comments

Third of a family after A000124 and A084684. Built from the second differences. The fourth sequence is 1, 2, 4, 8, 16, 32, 49, 91, ..., from periodic [1, 2, 4, 8].

References

  • 0

Crossrefs

Cf. A069705, A047350 (first differences), A130518.

Programs

  • Mathematica
    CoefficientList[ Series[-(4x^4 +x^3 +x^2 +1)/((x -1)^3 (x^2 +x +1)), {x, 0, 50}], x] (* or *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {1, 2, 4, 8, 16}, 50] (* Robert G. Wilson v, Jul 18 2018 *)

Formula

Repeat the second differences of 1, 2, 4, 8, 16, i.e., repeat [1, 2, 4].
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
a(n) = A069705(n) + 7*A130518(n).

A306969 Numbers congruent to 1, 2, or 4 mod 7 that are not represented by x^2+7*y^2+7*z^2.

Original entry on oeis.org

2, 22, 46, 58, 85, 93, 102, 205, 298, 310, 330, 358, 466, 478, 697, 862, 949, 1222, 1402, 1513, 1957, 1978, 2962, 3502, 7165, 10558
Offset: 1

Views

Author

N. J. A. Sloane, Mar 26 2019

Keywords

Crossrefs

Cf. A047350 (numbers congruent to {1, 2, 4} mod 7).
Showing 1-6 of 6 results.