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.

A333448 Smallest positive divisibility coefficient of A045572(n).

This page as a plain text file.
%I A333448 #41 Apr 20 2024 10:30:01
%S A333448 1,1,5,1,10,4,12,2,19,7,19,3,28,10,26,4,37,13,33,5,46,16,40,6,55,19,
%T A333448 47,7,64,22,54,8,73,25,61,9,82,28,68,10,91,31,75,11,100,34,82,12,109,
%U A333448 37,89,13,118,40,96,14,127,43,103,15,136,46,110,16,145,49,117
%N A333448 Smallest positive divisibility coefficient of A045572(n).
%C A333448 The sequence was generated in an attempt to create a universal divisibility test. Namely, taking the last digit of the number inspected, multiplying it by a number (the "divisibility coefficient"), and adding it to the inspected number without the last digit. Then, if the result is divisible by the number we are checking, so is our original number. This test works only for numbers coprime to 10, hence the sequence is based on A045572. The sequence lists the smallest positive divisibility coefficients of the members of A045572.
%C A333448 a(n) may equivalently be defined as the multiplicative inverse of 10 modulo A045572(n). - _Ely Golden_, Mar 27 2024
%H A333448 Michael De Vlieger, <a href="/A333448/b333448.txt">Table of n, a(n) for n = 1..10000</a>
%H A333448 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,2,0,0,0,-1).
%F A333448 The sequence can be defined piecewise: 9m+1 for numbers of the form 10m+1; 3m+1 for numbers of the form 10m+3; 7m+5 for numbers of the form 10m+7 and m+1 for numbers of the form 10m+9.
%F A333448 From _Lorenzo Sauras Altuzarra_, Sep 29 2020: (Start)
%F A333448 a(n) = 1/10 - (1 - 2*(floor((n + 1)/4) + n))*(1 - (1 + (floor(16*9^n/205) mod 9))/10).
%F A333448 a(n) = b(n) - (((b(n) mod 10)^3 mod 10)*b(n) - 1)/10, where b(n) = A045572(n). (End)
%e A333448 For example, let us check whether 21 is divisible by 7. First, we take off the last digit, 1. Since 7 is the third member of A045572, its divisibility coefficient is the third member of this sequence, namely 5. Then we multiply 5 times 1 to obtain 5, and we add it to the original number without the last digit, in our case, 2. We get 7, and since it is clearly divisible by 7, so is 21.
%t A333448 Array[# - (# Mod[PowerMod[#, 3, 10], 10] - 1)/10 &[1/2*(5*# + Mod[3*# + 2, 4] - 4)] &, 67] (* _Michael De Vlieger_, Oct 05 2020 *)
%o A333448 (PARI) lista(nn) = {for (n=1, nn, if (gcd(n,10) == 1, my(m=n % 10, k=n\10, x); if (m == 1, x = 9*k+1); if (m == 3, x = 3*k+1); if (m == 7, x = 7*k+5); if (m == 9, x = k+1); print1(x, ", ");););} \\ _Michel Marcus_, May 04 2020
%o A333448 (Python)
%o A333448 def a(n):
%o A333448     u = 10*((n-1) // 4) + [1, 3, 7, 9][(n-1) % 4]
%o A333448     return pow(10, -1, u) + (u == 1)
%o A333448 print(*(a(i) for i in range(1,101)), sep=", ")
%o A333448 # _Ely Golden_, Mar 27 2024
%Y A333448 Cf. A045572.
%K A333448 nonn
%O A333448 1,3
%A A333448 _Ivan Stoykov_, Mar 21 2020
%E A333448 More terms from _Michel Marcus_, May 04 2020