(Translated by https://www.hiragana.jp/)
A064438 -id:A064438 - OEIS
login
Search: a064438 -id:a064438
     Sort: relevance | references | number | modified | created      Format: long | short | data
Primorial base Niven numbers: numbers divisible by their sum of digits in primorial base (A276150).
+10
27
1, 2, 4, 6, 8, 9, 12, 16, 18, 20, 24, 25, 30, 32, 33, 36, 40, 42, 44, 45, 48, 50, 60, 64, 65, 66, 68, 70, 72, 77, 84, 88, 90, 92, 96, 105, 108, 112, 117, 120, 132, 133, 136, 144, 150, 154, 156, 160, 168, 180, 182, 184, 189, 192, 198, 200, 210, 212, 213, 216, 220
OFFSET
1,2
COMMENTS
Numbers k for which A276086(k) is in A373852. - Antti Karttunen, Jun 22 2024
EXAMPLE
1 is a term since A276150(1) = 1 divides 1;
2 is a term since A276150(2) = 1 divides 2;
MATHEMATICA
max = 5; bases = Prime @ Range[max, 1, -1]; nmax = Times @@ bases - 1; sumdig[n_] := Plus @@ IntegerDigits[n, MixedRadix[bases]]; Select[Range[nmax], Divisible[#, sumdig[#]] &]
PROG
(PARI) isA333426 = A373834; \\ Antti Karttunen, Jun 22 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Mar 20 2020
STATUS
approved
Divisible by the sum of the digits of its base-5 representation.
+10
19
1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 18, 20, 24, 25, 26, 27, 28, 30, 32, 36, 40, 42, 45, 48, 50, 51, 52, 54, 56, 60, 63, 64, 65, 66, 72, 75, 76, 78, 80, 85, 88, 90, 91, 96, 99, 100, 102, 104, 105, 112, 117, 120, 125, 126, 128, 130, 132, 135, 136, 138, 140, 144, 145
OFFSET
1,2
LINKS
EXAMPLE
Base-5 representation of 28 is 103; 1 + 0 + 3 = 4 divides 28.
PROG
(ARIBAS): maxarg := 160; for n := 1 to maxarg do if n mod sum(basearray(n, 5)) = 0 then write(n, " "); end; end; function basearray(n, b: integer): array; var k: integer; stk: stack; begin while n > 0 do k := n mod b; stack_push(stk, k); n := (n - k) div b; end; return stack2array(stk); end; .
(PARI) SumD(x)= { my(s); s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) }
baseE(x, b)= { my(d, e, f); e=0; f=1; while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) }
{ n=0; for (m=1, 10^9, if (m%(SumD(baseE(m, 5)))==0, write("b064481.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 15 2009
(PARI) isok(n) = !(n % sumdigits(n, 5)); \\ Michel Marcus, Jun 24 2018
CROSSREFS
Cf. A005349 (base 10), A049445 (base 2), A064150 (base 3), A064438 (base 4).
KEYWORD
base,easy,nonn
AUTHOR
Klaus Brockhaus, Oct 03 2001
EXTENSIONS
Offset changed from 0 to 1 by Harry J. Smith, Sep 15 2009
STATUS
approved
Base phi Niven numbers: numbers divisible by the number of 1's in their base phi representation (A055778).
+10
19
1, 2, 6, 12, 15, 16, 18, 20, 30, 35, 36, 45, 48, 55, 60, 70, 72, 78, 84, 90, 91, 95, 96, 98, 104, 108, 132, 144, 147, 154, 168, 175, 184, 189, 208, 224, 231, 232, 245, 252, 256, 261, 264, 270, 275, 280, 282, 287, 294, 315, 322, 324, 330, 336, 340, 342, 351, 357
OFFSET
1,2
EXAMPLE
6 is a term since its base phi representation is 1010.0001, and the number of 1's is 3, which is a divisor of 6.
MATHEMATICA
phiDigSum[1] = 1; phiDigSum[n_] := Plus @@ RealDigits[n, GoldenRatio, 2*Ceiling[ Log[GoldenRatio, n]] ][[1]]; Select[Range[360], Divisible[#, phiDigSum[#]] &]
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Apr 22 2020
STATUS
approved
Niven numbers in base 3/2: numbers divisible by their sum of digits in fractional base 3/2 (A244040).
+10
17
1, 2, 6, 9, 14, 21, 40, 42, 56, 72, 84, 108, 110, 120, 126, 130, 143, 154, 156, 162, 165, 168, 169, 176, 180, 182, 189, 198, 220, 225, 231, 243, 252, 280, 288, 297, 306, 308, 320, 322, 330, 336, 348, 350, 364, 390, 423, 430, 432, 459, 460, 462, 480, 490, 504
OFFSET
1,2
LINKS
EXAMPLE
6 is a term since its representation in base 3/2 is 210 and 2 + 1 + 0 = 3 is a divisor of 6.
9 is a term since its representation in base 3/2 is 2100 and 2 + 1 + 0 + 0 = 3 is a divisor of 9.
MATHEMATICA
s[0] = 0; s[n_] := s[n] = s[2*Floor[n/3]] + Mod[n, 3]; q[n_] := Divisible[n, s[n]]; Select[Range[500], q]
CROSSREFS
Subsequences: A342427, A342428, A342429.
Similar sequences: A005349 (decimal), A049445 (binary), A064150 (ternary), A064438 (quaternary), A064481 (base 5), A118363 (factorial), A328208 (Zeckendorf), A328212 (lazy Fibonacci), A331085 (negaFibonacci), A333426 (primorial), A334308 (base phi), A331728 (negabinary).
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 11 2021
STATUS
approved
Niven numbers in base i-1: numbers that are divisible by the sum of their digits in base i-1.
+10
17
1, 2, 3, 4, 5, 6, 7, 10, 12, 15, 16, 18, 20, 24, 25, 30, 32, 33, 35, 36, 40, 42, 44, 45, 48, 50, 54, 60, 64, 65, 66, 70, 77, 80, 88, 90, 96, 99, 100, 110, 112, 120, 124, 125, 126, 130, 140, 144, 145, 147, 150, 156, 160, 168, 170, 180, 182, 184, 185, 186, 190, 192
OFFSET
1,2
COMMENTS
Numbers k that are divisible by A066323(k).
Equivalently, Niven numbers in base -4, since A066323(k) is also the sum of the digits of k in base -4.
LINKS
Walter Penney, A "binary" system for complex numbers, Journal of the ACM, Vol. 12, No. 2 (1965), pp. 247-248.
EXAMPLE
2 is a term since its representation in base i-1 is 1100 and 1+1+0+0 = 2 is a divisor of 2.
10 is a term since its representation in base i-1 is 111001100 and 1+1+1+0+0+1+1+0+0 = 5 is a divisor of 10.
MATHEMATICA
v = {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 1, 0, 0}, {1, 1, 0, 1}}; q[n_] := Divisible[n, Total[Flatten @ v[[1 + Reverse @ Most[Mod[NestWhileList[(# - Mod[#, 4])/-4 &, n, # != 0 &], 4]]]]]]; Select[Range[200], q]
CROSSREFS
Similar sequences: A005349 (decimal), A049445 (binary), A064150 (ternary), A064438 (quaternary), A064481 (base 5), A118363 (factorial), A328208 (Zeckendorf), A328212 (lazy Fibonacci), A331085 (negaFibonacci), A333426 (primorial), A334308 (base phi), A331728 (negabinary), A342426 (base 3/2).
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 19 2021
STATUS
approved
Gray-code Niven numbers: numbers divisible by the number of 1's in their binary reflected Gray code (A005811).
+10
15
1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 15, 16, 20, 24, 27, 28, 30, 31, 32, 33, 36, 39, 40, 42, 44, 45, 48, 51, 52, 56, 57, 60, 62, 63, 64, 68, 72, 75, 76, 80, 84, 88, 90, 92, 96, 99, 100, 104, 105, 108, 111, 112, 116, 120, 123, 124, 126, 127, 128, 129, 132, 135, 136
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Gray Code.
Wikipedia, Gray code.
EXAMPLE
2 is a term since its Gray code is 11 and 1+1 = 2 is a divisor of 2.
6 is a term since its Gray code is 101 and 1+0+1 = 2 is a divisor of 6.
MATHEMATICA
gcNivenQ[n_] := Divisible[n, DigitCount[BitXor[n, Floor[n/2]], 2, 1]]; Select[Range[150], gcNivenQ]
CROSSREFS
Subsequences: A344342, A344343, A344344.
Similar sequences: A005349 (decimal), A049445 (binary), A064150 (ternary), A064438 (quaternary), A064481 (base 5), A118363 (factorial), A328208 (Zeckendorf), A328212 (lazy Fibonacci), A331085 (negaFibonacci), A333426 (primorial), A334308 (base phi), A331728 (negabinary), A342426 (base 3/2), A342726 (base i-1).
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, May 15 2021
STATUS
approved
Lucas-Niven numbers: numbers that are divisible by the number of terms in their minimal (or greedy) representation in terms of the Lucas numbers (A130310).
+10
13
1, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 18, 20, 22, 24, 27, 29, 30, 32, 36, 39, 40, 42, 47, 48, 50, 54, 57, 58, 60, 64, 66, 69, 72, 76, 78, 80, 81, 84, 90, 92, 94, 96, 100, 104, 108, 120, 123, 124, 126, 129, 130, 132, 134, 135, 138, 140, 144, 152, 153, 156, 159, 160
OFFSET
1,2
COMMENTS
Numbers k such that A116543(k) | k.
LINKS
EXAMPLE
6 is a term since its minimal Lucas representation, A130310(6) = 1001, has A116543(6) = 2 1's and 6 is divisible by 2.
MATHEMATICA
lucasNivenQ[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; Divisible[n, Plus @@ IntegerDigits[Total[2^s], 2]]]; Select[Range[160], lucasNivenQ]
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Feb 17 2022
STATUS
approved
Lazy-Lucas-Niven numbers: numbers divisible by the number of terms in their maximal (or lazy) representation in terms of the Lucas numbers (A130311).
+10
13
1, 2, 4, 6, 9, 12, 16, 20, 25, 40, 42, 54, 60, 66, 78, 84, 91, 96, 104, 112, 120, 126, 144, 154, 161, 168, 175, 176, 180, 182, 184, 192, 203, 210, 216, 217, 224, 232, 234, 240, 243, 264, 270, 280, 288, 304, 306, 310, 315, 320, 322, 328, 336, 344, 350, 360, 378
OFFSET
1,2
COMMENTS
Numbers k such that A131343(k) | k.
LINKS
EXAMPLE
6 is a term since its maximal Lucas representation, A130311(6) = 111, has A131343(6) = 3 1's and 6 is divisible by 3.
MATHEMATICA
lazy = Select[IntegerDigits[Range[3000], 2], SequenceCount[#, {0, 0}] == 0 &]; t = Total[# * Reverse @ LucasL[Range[0, Length[#] - 1]]] & /@ lazy; s = FromDigits /@ lazy[[TakeWhile[Flatten[FirstPosition[t, #] & /@ Range[Max[t]]], NumberQ]]]; Position[Divisible[Range[Length[s]], Plus @@@ IntegerDigits[s]], True] // Flatten
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Feb 17 2022
STATUS
approved
Tribonacci-Niven numbers: numbers that are divisible by the number of terms in their minimal (or greedy) representation in terms of the tribonacci numbers (A278038).
+10
13
1, 2, 4, 6, 7, 8, 12, 13, 14, 18, 20, 21, 24, 26, 27, 28, 30, 33, 36, 39, 40, 44, 46, 48, 56, 60, 68, 69, 72, 75, 76, 80, 81, 82, 84, 87, 88, 90, 94, 96, 100, 108, 115, 116, 120, 126, 128, 129, 132, 135, 136, 138, 140, 149, 150, 156, 162, 168, 174, 176, 177, 180
OFFSET
1,2
COMMENTS
Numbers k such that A278043(k) | k.
The positive tribonacci numbers (A000073) are all terms.
If k = A000073(A042964(m)) is an odd tribonacci number, then k+1 is a term.
Ray (2005) and Ray and Cooper (2006) called these numbers "3-Zeckendorf Niven numbers" and proved that their asymptotic density is 0. - Amiram Eldar, Sep 06 2024
REFERENCES
Andrew B. Ray, On the natural density of the k-Zeckendorf Niven numbers, Ph.D. dissertation, Central Missouri State University, 2005.
LINKS
Andrew Ray and Curtis Cooper, On the natural density of the k-Zeckendorf Niven numbers, J. Inst. Math. Comput. Sci. Math., Vol. 19 (2006), pp. 83-98.
EXAMPLE
6 is a term since its minimal tribonacci representation, A278038(6) = 110, has A278043(6) = 2 1's and 6 is divisible by 2.
MATHEMATICA
t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; q[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; Divisible[n, DigitCount[Total[2^(s - 1)], 2, 1]]]; Select[Range[180], q]
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 04 2022
STATUS
approved
Lazy-tribonacci-Niven numbers: numbers that are divisible by the number of terms in their maximal (or lazy) representation in terms of the tribonacci numbers (A352103).
+10
11
1, 2, 4, 6, 8, 12, 18, 20, 21, 24, 28, 30, 33, 36, 39, 40, 48, 50, 56, 60, 68, 70, 72, 75, 76, 80, 90, 96, 100, 108, 115, 116, 120, 135, 136, 140, 150, 155, 156, 160, 162, 168, 175, 176, 177, 180, 184, 185, 188, 195, 198, 204, 205, 208, 215, 216, 225, 231, 260
OFFSET
1,2
COMMENTS
Numbers k such that A352104(k) | k.
LINKS
EXAMPLE
6 is a term since its maximal tribonacci representation, A352103(6) = 110, has A352104(6) = 2 1's and 6 is divisible by 2.
MATHEMATICA
t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; trib[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; IntegerDigits[Total[2^(s - 1)], 2]]; q[n_] := Module[{v = trib[n]}, nv = Length[v]; i = 1; While[i <= nv - 3, If[v[[i ;; i + 3]] == {1, 0, 0, 0}, v[[i ;; i + 3]] = {0, 1, 1, 1}; If[i > 3, i -= 4]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, False, Divisible[n, Total[v[[i[[1, 1]] ;; -1]]]]]]; Select[Range[300], q]
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 05 2022
STATUS
approved

Search completed in 0.100 seconds