Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Jul 11 2021 07:21:49
%S 7,11,14,17,21,22,27,28,33,35,37,42,44,47,49,55,56,57,63,66,67,70,71,
%T 72,73,74,75,76,77,78,79,84,87,88,91,97,98,99,105,107,110,112,117,119,
%U 121,126,127,132,133,137,140,143,147,154,157,161,165,167,168,170
%N Jouka numbers: either the number is divisible by 7 or 11 or has a 7 in its decimal representation.
%C Jouka numbers are used in drinking games. Whenever a person wrongly identifies a jouka number he or she has to drink a beer.
%H Nathaniel Johnston, <a href="/A080837/b080837.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) ~ n. - _Charles R Greathouse IV_, Sep 10 2015
%e a(1) = 7, a(2) = 11, since 7 is the first jouka number (divisible by 7) and 11 is the second.
%p A080837 := proc(n) option remember: local k: if(n=1)then return 7: fi: for k from procname(n-1)+1 do if(k mod 7=0 or k mod 11=0 or member(7,convert(k,base,10)))then return k: fi: od: end: seq(A080837(n),n=1..60); # _Nathaniel Johnston_, May 26 2011
%t Select[Range[200],Divisible[#,7]||Divisible[#,11]||DigitCount[ #,10,7]> 0&] (* _Harvey P. Dale_, Jan 14 2017 *)
%o (PARI) is(n)=gcd(n,77)>1 || setsearch(Set(digits(n)),7) \\ _Charles R Greathouse IV_, Sep 10 2015
%o (Python)
%o def ok(n): return n%7 == 0 or n%11 == 0 or '7' in str(n)
%o print(list(filter(ok, range(1, 171)))) # _Michael S. Branicky_, Jul 11 2021
%K nonn,easy,base
%O 1,1
%A Sander and Pieter (eendebak(AT)math.uu.nl), Mar 28 2003
%E Terms after a(34) from _Nathaniel Johnston_, May 26 2011