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.

A076309 a(n) = floor(n/10) - 2*(n mod 10).

This page as a plain text file.
%I A076309 #34 Feb 16 2025 08:32:47
%S A076309 0,-2,-4,-6,-8,-10,-12,-14,-16,-18,1,-1,-3,-5,-7,-9,-11,-13,-15,-17,2,
%T A076309 0,-2,-4,-6,-8,-10,-12,-14,-16,3,1,-1,-3,-5,-7,-9,-11,-13,-15,4,2,0,
%U A076309 -2,-4,-6,-8,-10,-12,-14,5,3,1,-1,-3,-5,-7,-9,-11,-13,6,4,2,0,-2,-4,-6,-8,-10
%N A076309 a(n) = floor(n/10) - 2*(n mod 10).
%C A076309 Delete the last digit from n and subtract twice this digit from the shortened number. - _N. J. A. Sloane_, May 25 2019
%C A076309 (n==0 modulo 7) iff (a(n)==0 modulo 7); applied recursively, this property provides a useful test for divisibility by 7.
%D A076309 Paul Erdős and János Surányi. Topics in the Theory of Numbers. New York: Springer, 2003. Problem 6, page 3.
%D A076309 Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.2 Fundamental Operations, p. 121.
%D A076309 Karl Menninger, Rechenkniffe, Vandenhoeck & Ruprecht in Goettingen (1961), 79A.
%H A076309 Reinhard Zumkeller, <a href="/A076309/b076309.txt">Table of n, a(n) for n = 0..10000</a>
%H A076309 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DivisibilityTests.html">Divisibility Tests</a>.
%H A076309 Wikipedia, <a href="http://en.wikipedia.org/wiki/Divisibility_rule">Divisibility rule</a>.
%H A076309 <a href="/index/Rec#order_11">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,0,1,-1).
%F A076309 From _R. J. Mathar_, Nov 23 2010: (Start)
%F A076309 a(n) = a(n-1) + a(n-10) - a(n-11).
%F A076309 G.f.: x*(-2 -2*x -2*x^2 -2*x^3 -2*x^4 -2*x^5 -2*x^6 -2*x^7 -2*x^8 +19*x^9)/((1+x)*(x^4-x^3+x^2-x+1)*(x^4+x^3+x^2+x+1)*(x-1)^2). (End)
%e A076309 695591 is not a multiple of 7, as 695591 -> 69559-2*1=69557 -> 6955-2*7=6941 -> 694-2*1=692 -> 69-2*2=65=7*9+2, therefore the answer is NO.
%e A076309 Is 3206 divisible by 7? 3206 -> 320-2*6=308 -> 30-2*8=14=7*2, therefore the answer is YES, indeed 3206=2*7*229.
%t A076309 Table[Floor[n/10] - 2*Mod[n, 10], {n, 0, 100}] (* _G. C. Greubel_, Apr 07 2016 *)
%o A076309 (Haskell)
%o A076309 a076309 n =  n' - 2 * m where (n', m) = divMod n 10
%o A076309 -- _Reinhard Zumkeller_, Jun 01 2013
%o A076309 (PARI) a(n) = n\10 - 2*(n % 10); \\ _Michel Marcus_, Apr 07 2016
%Y A076309 Cf. A008589, A076310, A076311, A076312.
%K A076309 sign,base,easy
%O A076309 0,2
%A A076309 _Reinhard Zumkeller_, Oct 06 2002