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.

A174438 Numbers that are congruent to {0, 2, 5, 8} mod 9.

This page as a plain text file.
%I A174438 #40 May 22 2023 11:37:35
%S A174438 0,2,5,8,9,11,14,17,18,20,23,26,27,29,32,35,36,38,41,44,45,47,50,53,
%T A174438 54,56,59,62,63,65,68,71,72,74,77,80,81,83,86,89,90,92,95,98,99,101,
%U A174438 104,107,108,110,113,116,117,119,122,125,126,128,131,134,135,137
%N A174438 Numbers that are congruent to {0, 2, 5, 8} mod 9.
%C A174438 Also the set of nonnegative integers expressible as (x + 2y)(2x + y) for integer x and y, where integers of the form 3k + 2 are given by x = 2k + 1, y = -k, and integers of the form 9k are given by x = 2k - 1, y = 2 - k. - _Drake Thomas_, Nov 10 2022
%C A174438 From _Klaus Purath_, Feb 21 2023: (Start)
%C A174438 The sum of digits of any term belongs to the sequence. Also the products of an odd number of terms as well as products of one term each of this sequence and one term of A056991 are members. The products of an even number of terms belong to A056991.
%C A174438 Nonnegative integers of the forms 2*x^2 + (2*m+1)*x*y + ((m^2+m-2)/2)*y^2, for integers m. This includes the formula given by Drake Thomas above.
%C A174438 The union of this sequence and A056991 is closed under multiplication. (End)
%H A174438 Harvey P. Dale, <a href="/A174438/b174438.txt">Table of n, a(n) for n = 1..1000</a>
%H A174438 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F A174438 a(n) = 3*(n-floor(n/4)) - (3 - i^n - (-i)^n - (-1)^n)/4 where i=sqrt(-1), offset=0.
%F A174438 From _Wesley Ivan Hurt_, Jun 07 2016: (Start)
%F A174438 G.f.: x^2*(2 + 3*x + 3*x^2 + x^3)/((x-1)^2*(1 + x + x^2 + x^3)).
%F A174438 a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
%F A174438 a(n) = (18*n - 15 + i^(2*n) + (3-i)*i^(-n) + (3+i)*i^n)/8 where i=sqrt(-1). (End)
%p A174438 seq(3*(n-floor(n/4))-(3-I^n-(-I)^n-(-1)^n)/4, n=0..100);
%t A174438 Table[(18n-15+I^(2n)+(3-I)*I^(-n)+(3+I)*I^n)/8, {n, 80}] (* _Wesley Ivan Hurt_, Jun 07 2016 *)
%t A174438 Select[Range[0,150],MemberQ[{0,2,5,8},Mod[#,9]]&] (* _Harvey P. Dale_, Jan 02 2019 *)
%t A174438 LinearRecurrence[{1,0,0,1,-1},{0,2,5,8,9},70] (* _Harvey P. Dale_, Jan 15 2022 *)
%o A174438 (Magma) [n : n in [0..150] | n mod 9 in [0, 2, 5, 8]]; // _Wesley Ivan Hurt_, Jun 07 2016
%o A174438 (Python)
%o A174438 def A174438(n): return (0,2,5,8)[n&3]+9*(n>>2) # _Chai Wah Wu_, Jan 30 2023
%K A174438 nonn,easy
%O A174438 1,2
%A A174438 _Gary Detlefs_, Mar 19 2010
%E A174438 a(23) corrected by _Chai Wah Wu_, Jun 10 2016