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 11-20 of 48 results. Next

A115273 a(n) = floor(n/3)*(n mod 3).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 0, 2, 4, 0, 3, 6, 0, 4, 8, 0, 5, 10, 0, 6, 12, 0, 7, 14, 0, 8, 16, 0, 9, 18, 0, 10, 20, 0, 11, 22, 0, 12, 24, 0, 13, 26, 0, 14, 28, 0, 15, 30, 0, 16, 32, 0, 17, 34, 0, 18, 36, 0, 19, 38, 0, 20, 40, 0, 21, 42, 0, 22, 44, 0, 23, 46, 0, 24, 48, 0, 25, 50, 0, 26, 52, 0, 27, 54, 0, 28, 56
Offset: 0

Views

Author

Zak Seidov, Jan 18 2006

Keywords

Comments

Three arithmetic progressions interlaced: a(1)=1,2,0 and d=a(n+1)-a(n)=1,2,0. Cf. A115274(n) = n+a(n), n=1,2,3,...

Crossrefs

Cf. A115274.
Cf. A142150 (the base 2 analog), A257844, ..., A257850.

Programs

  • Magma
    [Floor(n/3)*(n mod 3): n in [0..100]]; // Vincenzo Librandi, May 11 2015
    
  • Mathematica
    Table[Floor[n/3]*Mod[n, 3], {n, 0, 86}] (* Extended to offset 0 by M. F. Hasler, May 11 2015 *)
  • PARI
    a(n, b=3)=(n=divrem(n, b))[1]*n[2] \\ M. F. Hasler, May 10 2015
    
  • Python
    from math import prod
    def A115273(n): return prod(divmod(n,3)) # Chai Wah Wu, Jan 19 2023

Formula

a(3*k+1) = k, a(3*k+2) = 2*k, a(3*k+3) = 0, k >= 1.
G.f.: x^4*(2*x+1) / ((x-1)^2*(x^2+x+1)^2). - Colin Barker, May 11 2015

Extensions

a(0)-a(3) and cross-references added by M. F. Hasler, May 11 2015

A209297 Triangle read by rows: T(n,k) = k*n + k - n, 1 <= k <= n.

Original entry on oeis.org

1, 1, 4, 1, 5, 9, 1, 6, 11, 16, 1, 7, 13, 19, 25, 1, 8, 15, 22, 29, 36, 1, 9, 17, 25, 33, 41, 49, 1, 10, 19, 28, 37, 46, 55, 64, 1, 11, 21, 31, 41, 51, 61, 71, 81, 1, 12, 23, 34, 45, 56, 67, 78, 89, 100, 1, 13, 25, 37, 49, 61, 73, 85, 97, 109, 121, 1, 14, 27
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 19 2013

Keywords

Comments

From Michel Marcus, May 18 2021: (Start)
The n-th row of the triangle is the main diagonal of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows.
[1 2 3 4 5]
[1 2 3 4] [6 7 8 9 10]
[1 2 3] [5 6 7 8] [11 12 13 14 15]
[1 2] [4 5 6] [9 10 11 12] [16 17 18 19 20]
[1] [3 4] [7 8 9] [13 14 15 16] [21 22 23 24 25]
-----------------------------------------------------------
1 1 4 1 5 9 1 6 11 16 1 7 13 19 25
(End)

Examples

			From _Muniru A Asiru_, Oct 31 2017: (Start)
Triangle begins:
  1;
  1,  4;
  1,  5,  9;
  1,  6, 11, 16;
  1,  7, 13, 19, 25;
  1,  8, 15, 22, 29, 36;
  1,  9, 17, 25, 33, 41, 49;
  1, 10, 19, 28, 37, 46, 55, 64;
  1, 11, 21, 31, 41, 51, 61, 71, 81;
  1, 12, 23, 34, 45, 56, 67, 78, 89, 100;
  ... (End)
		

Crossrefs

Cf. A162610; A000012 (left edge), A000290 (right edge), A006003 (row sums), A001844 (central terms), A026741 (number of odd terms per row), A142150 (number of even terms per row), A221490 (number of primes per row).

Programs

  • GAP
    Flat(List([1..10^3], n -> List([1..n], k -> k * n + k - n))); # Muniru A Asiru, Oct 31 2017
  • Haskell
    a209297 n k = k * n + k - n
    a209297_row n = map (a209297 n) [1..n]
    a209297_tabl = map a209297_row [1..]
    
  • Mathematica
    Array[Range[1, #^2, #+1]&,10] (* Paolo Xausa, Feb 08 2024 *)

Formula

T(n,k) = (k-1)*(n+1)+1.

A375924 Number A(n,k) of partitions of [n] such that the element sum of each block is one more than a multiple of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 5, 0, 1, 1, 0, 2, 15, 0, 1, 1, 0, 0, 4, 52, 0, 1, 1, 0, 1, 1, 10, 203, 0, 1, 1, 0, 1, 2, 3, 28, 877, 0, 1, 1, 0, 0, 0, 3, 9, 96, 4140, 0, 1, 1, 0, 0, 0, 0, 1, 17, 320, 21147, 0, 1, 1, 0, 0, 0, 1, 1, 8, 108, 1436, 115975, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 02 2024

Keywords

Examples

			A(5,2) = 10: 12345, 124|3|5, 12|34|5, 12|3|45, 14|23|5, 1|234|5, 1|23|45, 14|25|3, 1|245|3, 1|25|34.
A(6,3) = 9: 136|25|4, 13|256|4, 13|25|46, 16|235|4, 1|2356|4, 1|235|46, 16|25|34, 1|256|34, 1|25|346.
A(7,4) = 8: 14|23|5|67, 1|234|5|67, 1|23|45|67, 1|23|467|5, 14|27|36|5, 1|247|36|5, 1|27|346|5, 1|27|36|45.
A(8,5) = 1: 12345678.
A(8,8) = 4: 18|27|36|45, 1|278|36|45, 1|27|368|45, 1|27|36|458.
A(9,6) = 87: 123469|58|7, 12349|568|7, 12349|58|67, 123568|49|7, ..., 1|25|346789, 16|289|3457, 1|2689|3457, 1|289|34567.
A(9,8) = 5: 18|27|36|45|9, 1|278|36|45|9, 1|27|368|45|9, 1|27|36|458|9, 1|27|36|45|89.
A(9,10) = 1: 1|29|38|47|56.
Square array A(n,k) begins:
  1,      1,    1,    1,   1,  1,  1,  1, 1, 1, 1, ...
  1,      1,    1,    1,   1,  1,  1,  1, 1, 1, 1, ...
  0,      2,    1,    0,   0,  0,  0,  0, 0, 0, 0, ...
  0,      5,    2,    0,   1,  1,  0,  0, 0, 0, 0, ...
  0,     15,    4,    1,   2,  0,  0,  0, 1, 1, 0, ...
  0,     52,   10,    3,   3,  0,  1,  1, 0, 0, 0, ...
  0,    203,   28,    9,   1,  1,  3,  0, 0, 1, 1, ...
  0,    877,   96,   17,   8, 15,  4,  0, 1, 1, 0, ...
  0,   4140,  320,  108,  32,  1,  0,  1, 4, 0, 0, ...
  0,  21147, 1436,  324,  51, 10, 87, 72, 5, 0, 1, ...
  0, 115975, 5556, 1409, 621, 50,  1,  0, 0, 1, 5, ...
		

Crossrefs

Rows n=1-2 give: A000012, A033322 (for k>=1).
Main diagonal gives A142150 (for n>=2).
A(n+1,n) gives A158416 (for n>=2).
A(n,n+1) gives A135528(n+1).

A237420 If n is odd, then a(n) = 0; otherwise, a(n) = n.

Original entry on oeis.org

0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 22, 0, 24, 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 40, 0, 42, 0, 44, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 64, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74
Offset: 0

Views

Author

Vincenzo Librandi, Feb 24 2014

Keywords

Comments

Normally the OEIS excludes sequences in which every other term is zero. But there are exceptions for especially important sequences like this one. - N. J. A. Sloane, Feb 27 2014
Essentially the factorial expansion of exp(-1): exp(-1) = Sum_{n>=1} a(n)/(n+1)!. - Joerg Arndt, Mar 13 2014
a(n) is the number of m < n for which a(m) has the same parity as n. For instance, a(4) = 4 because 4 has the same parity as a(0), a(1), a(2), and a(3). - Alec Jones, May 16 2016
This sequence is an example of a sequence that has no limit while the Cesàro means limit is infinite. See A354280 for further information. - Bernard Schott, May 22 2022

References

  • J. M. Arnaudiès, P. Delezoide et H. Fraysse, Exercices résolus d'Analyse du cours de mathématiques - 2, Dunod, Exercice 10, pp. 14-16.

Crossrefs

About the Cesàro mean theorem: A033999, A114112.

Programs

  • Magma
    [IsOdd(n) select 0 else n: n in [1..80]];
    
  • Magma
    [(1+(-1)^n)*n/2: n in [1..80]];
    
  • Magma
    &cat [[n, 0]: n in [0..80 by 2]]; // Bruno Berselli, Nov 11 2016
    
  • Maple
    seq(op([0,2*i]),i=1..30); # Robert Israel, Aug 27 2015
  • Mathematica
    Table[If[OddQ[n], 0, n], {n, 80}]
    CoefficientList[Series[2 x /(1 - x^2)^2, {x, 0, 80}], x]
    LinearRecurrence[{0, 2, 0, -1}, {0, 0, 2, 0}, 75] (* Robert G. Wilson v, Nov 11 2016 *)
    Riffle[Range[0,80,2],0] (* Harvey P. Dale, Mar 16 2021 *)
  • PARI
    a(n)=if(n%2==0,n,0) \\ Anders Hellström, Aug 27 2015
    
  • Python
    def a(n): return 0 if n%2 else n # Michael S. Branicky, Jun 05 2022

Formula

O.g.f.: 2*x^2/(1-x^2)^2.
E.g.f.: x*sinh(x). - Robert Israel, Aug 27 2015
a(n) = 2*a(n-2) - a(n-4) for n>4.
a(n) = 2*A142150(n) = (1+(-1)^n)*n/2 = n*((n-1) mod 2).
a(n) = floor(n^(-1)^n) for n>1. - Ilya Gutkovskiy, Aug 27 2015
Sum_{i=1..n} a(i) = A110660(n). - Bruno Berselli, Feb 27 2014
a(n) = -1 + ceiling((n + 1)^(sin(Pi*n/2) + cos(Pi*n))). - Lechoslaw Ratajczak, Nov 06 2016

Extensions

Edited by Bruno Berselli, Feb 27 2014

A257844 a(n) = floor(n/4) * (n mod 4).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 3, 0, 2, 4, 6, 0, 3, 6, 9, 0, 4, 8, 12, 0, 5, 10, 15, 0, 6, 12, 18, 0, 7, 14, 21, 0, 8, 16, 24, 0, 9, 18, 27, 0, 10, 20, 30, 0, 11, 22, 33, 0, 12, 24, 36, 0, 13, 26, 39, 0, 14, 28, 42, 0, 15, 30, 45, 0, 16, 32, 48, 0, 17, 34, 51, 0, 18, 36
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 4, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base-2 analog), A115273, A257845 - A257850.

Programs

  • Magma
    [Floor(n/4)*(n mod 4) : n in [0..100]]; // Wesley Ivan Hurt, Jun 22 2015
    
  • Magma
    I:=[0,0,0,0,0,1,2,3]; [n le 8 select I[n] else 2*Self(n-4)-Self(n-8): n in [1..100]]; // Vincenzo Librandi, Jun 23 2015
    
  • Maple
    A257844:=n->floor(n/4)*(n mod 4): seq(A257844(n), n=0..100); # Wesley Ivan Hurt, Jun 22 2015
  • Mathematica
    Table[Floor[n/4] Mod[n, 4], {n, 0, 100}] (* Wesley Ivan Hurt, Jun 22 2015 *)
  • PARI
    a(n,b=4)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0], Vec(x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
    
  • Python
    def A257844(n): return (n>>2)*(n&3) # Chai Wah Wu, Jan 27 2023

Formula

a(n) = 2*a(n-4) - a(n-8), n > 8. - Colin Barker, May 11 2015
G.f.: x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, May 11 2015
a(n) = (3 - 2*(-1)^((2*n - 1 + (-1)^n)/4) - (-1)^n)*(2*n - 3 + 2*(-1)^((2*n - 1 + (-1)^n)/4) + (-1)^n)/16. - Wesley Ivan Hurt, Jun 22 2015

A195034 Vertex number of a square spiral in which the length of the first two edges are the legs of the primitive Pythagorean triple [21, 20, 29]. The edges of the spiral have length A195033.

Original entry on oeis.org

0, 21, 41, 83, 123, 186, 246, 330, 410, 515, 615, 741, 861, 1008, 1148, 1316, 1476, 1665, 1845, 2055, 2255, 2486, 2706, 2958, 3198, 3471, 3731, 4025, 4305, 4620, 4920, 5256, 5576, 5933, 6273, 6651, 7011, 7410, 7790, 8210, 8610, 9051, 9471
Offset: 0

Views

Author

Omar E. Pol, Sep 12 2011

Keywords

Comments

Zero together with partial sums of A195033.
The only primes in the sequence are 41 and 83 since a(n) = (1/2)*((2*n+(-1)^n+3)/4)*((82*n-43*(-1)^n+43)/4). - Bruno Berselli, Oct 12 2011
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives multiples of 29 (Cf. A195819). The vertices on the main diagonal are the numbers A195038 = (21+20)*A000217 = 41*A000217, where both 21 and 20 are the first two edges in the spiral. The distance "a" between nearest edges that are perpendicular to the initial edge of the spiral is 21, while the distance "b" between nearest edges that are parallel to the initial edge is 20, so the distance "c" between nearest vertices on the same axis is 29 because from the Pythagorean theorem we can write c = (a^2+b^2)^(1/2) = sqrt(21^2+20^2) = sqrt(441+400) = sqrt(841) = 29. - Omar E. Pol, Oct 12 2011

Crossrefs

Programs

  • Magma
    [(2*n*(41*n+83)-(2*n+43)*(-1)^n+43)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
    
  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{0,21,41,83,123},50] (* Harvey P. Dale, May 02 2012 *)
  • PARI
    concat(0, Vec(x*(21+20*x)/((1+x)^2*(1-x)^3) + O(x^60))) \\ Michel Marcus, Mar 08 2016

Formula

From Bruno Berselli, Oct 12 2011: (Start)
G.f.: x*(21+20*x)/((1+x)^2*(1-x)^3).
a(n) = (2*n*(41*n+83)-(2*n+43)*(-1)^n+43)/16.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5).
a(n)-a(-n-2) = A142150(n+1). (End)

A142151 a(n) = OR{k XOR (n-k): 0<=k<=n}.

Original entry on oeis.org

0, 1, 2, 3, 6, 5, 6, 7, 14, 13, 14, 11, 14, 13, 14, 15, 30, 29, 30, 27, 30, 29, 30, 23, 30, 29, 30, 27, 30, 29, 30, 31, 62, 61, 62, 59, 62, 61, 62, 55, 62, 61, 62, 59, 62, 61, 62, 47, 62, 61, 62, 59, 62, 61, 62, 55, 62, 61, 62, 59, 62, 61, 62, 63, 126, 125, 126, 123, 126, 125
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 15 2008

Keywords

Crossrefs

Programs

  • Haskell
    import Data.Bits (xor, (.|.))
    a142151 :: Integer -> Integer
    a142151 = foldl (.|.) 0 . zipWith xor [0..] . reverse . enumFromTo 1
    -- Reinhard Zumkeller, Mar 31 2015
    
  • Julia
    using IntegerSequences
    A142151List(len) = [Bits("CIMP", n, n+1) for n in 0:len]
    println(A142151List(69))  # Peter Luschny, Sep 25 2021
    
  • Maple
    A142151 := n -> n + Bits:-Nor(n, n+1):
    seq(A142151(n), n=0..69); # Peter Luschny, Sep 26 2019
  • Python
    from functools import reduce
    from operator import or_
    def A142151(n): return 0 if n == 0 else reduce(or_,(k^n-k for k in range(n+1))) if n % 2 else (1 << n.bit_length()-1)-1 <<1 # Chai Wah Wu, Jun 30 2022

Formula

a(2*n) = 2*(A062383(n)-1);
A023416(a(n)) <= 1.

A242480 a(n) = (n*(n+1)/2) mod n + sigma(n) mod n + antisigma(n) mod n.

Original entry on oeis.org

0, 2, 3, 8, 5, 6, 7, 16, 9, 20, 11, 12, 13, 28, 15, 32, 17, 18, 19, 20, 21, 44, 23, 24, 25, 52, 27, 28, 29, 30, 31, 64, 33, 68, 35, 72, 37, 76, 39, 40, 41, 42, 43, 88, 45, 92, 47, 96, 49, 100, 51, 104, 53, 54, 55, 56, 57, 116, 59, 120, 61, 124, 63, 128, 65, 66
Offset: 1

Views

Author

Jaroslav Krizek, May 16 2014

Keywords

Comments

a(n) / n = 1 for numbers n from A242482, a(n) / n = 2 for numbers n from A242483.
If there are any odd multiply-perfect numbers n > 1 then a(n) = 0.
Possible values of a(n) in increasing order = A242485. Numbers m such that a(n) = m has no solution = A242486.

Examples

			a(8) = (8*(8+1)/2) mod 8 + sigma(8) mod 8 + antisigma(8) mod 8 = 36 mod 8 + 15 mod 8 + 21 mod 8 = 4 + 7 + 5 = 16.
		

Crossrefs

Programs

  • Magma
    [((n*(n+1)div 2 mod n + SumOfDivisors(n) mod n + (n*(n+1)div 2-SumOfDivisors(n)) mod n)): n in [1..1000]]

Formula

a(n) = A142150(n) + A054024(n) + A229110(n) = (A000217(n) mod n) + (A000203(n) mod n) + (A024816(n) mod n).
a(n) = A242481(n) * n.

A242481 a(n) = ((n*(n+1)/2) mod n + sigma(n) mod n + antisigma(n) mod n) / n.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, May 16 2014

Keywords

Comments

a(1) = 0. If there is no odd multiply-perfect number then a(n) = 1 or 2 for n >= 2. See A242482 = numbers m such that a(n) = 1, A242483 = numbers m such that a(n) = 2. If there are any odd multiply-perfect numbers m > 1 then a(m) = 0.

Examples

			a(8) = [(8*(8+1)/2) mod 8 + sigma(8) mod 8 + antisigma(8) mod 8] / 8 = (36 mod 8 + 15 mod 8 + 21 mod 8) / 8 = (4 + 7 + 5 ) / 8 = 2.
		

Crossrefs

Programs

  • Magma
    [((n*(n+1)div 2 mod n + SumOfDivisors(n) mod n + (n*(n+1)div 2-SumOfDivisors(n)) mod n))div n: n in [1..1000]]

Formula

a(n) = (A142150(n) + A054024(n) + A229110(n)) / n = ((A000217(n) mod n) + (A000203(n) mod n) + (A024816(n) mod n)) / n.
a(n) = A242480(n) / n.

A242482 Numbers n such that A242481(n) = ((n*(n+1)/2) mod n + sigma(n) mod n + antisigma(n) mod n) / n = 1.

Original entry on oeis.org

2, 3, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 31, 33, 35, 37, 39, 40, 41, 42, 43, 45, 47, 49, 51, 53, 54, 55, 56, 57, 59, 61, 63, 65, 66, 67, 69, 70, 71, 73, 75, 77, 78, 79, 80, 81, 83, 85, 87, 88, 89, 91, 93, 95, 97, 99
Offset: 1

Views

Author

Jaroslav Krizek, May 16 2014

Keywords

Comments

Numbers n such that A242480(n) = (1/2*n*(n+1)) mod n + sigma(n) mod n + antisigma(n) mod n = (A142150(n) + A054024(n) + A229110(n)) = ((A000217(n) mod n) + (A000203(n) mod n) + (A024816(n) mod n)) = n. Numbers n such that A242481(n) = (A142150(n) + A054024(n) + A229110(n)) / n = ((A000217(n) mod n) + (A000203(n) mod n) + (A024816(n) mod n)) / n = 1.
Conjecture: with number 1 complement of A242483.
Supersequence of primes (A000040).
If there is no odd multiply-perfect number, then:
(1) a(n) = union of odd numbers >= 3 and even numbers from A239719.
(2) a(n) = supersequence of odd numbers (A005408).

Examples

			6 is in sequence because [(6*(6+1)/2) mod 6 + sigma(6) mod 6 + antisigma(6) mod 6] / 6 = (21 mod 6 + 12 mod 6 + 9 mod 6) / 6 = (3 + 0 + 3 ) / 6 = 1.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1000] | n eq ((n*(n+1)div 2 mod n + SumOfDivisors(n) mod n + (n*(n+1)div 2-SumOfDivisors(n)) mod n))]
Previous Showing 11-20 of 48 results. Next