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.

Previous Showing 61-64 of 64 results.

A280997 Primes that have exactly 3 ones in both their binary and ternary expansions.

Original entry on oeis.org

13, 37, 41, 67, 97, 131, 193, 577, 1033, 1153, 2053, 4129, 8209, 18433, 32771, 32801, 32833, 65539, 133121, 525313, 557057, 1049089, 4194433, 167772161, 268435459
Offset: 1

Views

Author

K. D. Bajpai, Jan 12 2017

Keywords

Comments

Sequence is likely to be finite. If it exists, a(26) > 10^200. - Robert Israel, Jan 12 2017

Examples

			37 is in the sequence because it is a prime and its binary expansion 100101 and ternary expansion 1101 both have exactly 3 ones.
131 is in the sequence because it is a prime and its binary expansion 10000011 and ternary expansion 11212 both have exactly 3 ones.
		

Crossrefs

Programs

  • Maple
    A:= NULL:
    for a from 2 to 100 do
      for b from 1 to a-1 do
        p:= 2^a + 2^b + 1;
        if numboccur(1, convert(p,base,3)) = 3 and isprime(p) then
          A:= A, p
        fi
    od od:
    A; # Robert Israel, Jan 12 2017
  • Mathematica
    Select[Prime[Range[500000]], Count[IntegerDigits[#, 3], 1] == Count[IntegerDigits[#, 2], 1] == 3 &]
    Select[Prime[Range[300000]],DigitCount[#,2,1]==DigitCount[#,3,1]==3&] (* The program generates the first 23 terms of the sequence. *) (* Harvey P. Dale, Jul 20 2025 *)

A362950 Bitmaps of king + rook vs. king checkmate patterns on a standard 8 X 8 board.

Original entry on oeis.org

65541, 65541, 65545, 65553, 65569, 65601, 65665, 66561, 131077, 131081, 131082, 131089, 131090, 131105, 131106, 131137, 131138, 131201, 131202, 262149, 262164, 262180, 262212, 262276, 327681, 524297, 524298, 524328, 524360, 524424, 1048593, 1048594
Offset: 1

Views

Author

M. F. Hasler, Jun 13 2023

Keywords

Comments

For each of the 216 possible checkmate positions with K, R and k on one of the squares numbered from 0 to 63, the sequence lists the value 2^K + 2^R + 2^k, see examples.
With the usual rules of chess, this allows the unique determination of the square on which each piece is located, except for one single exception where the black king is in the corner and the white K & R are both at the distance of one (empty) square from it, also on the border: the position where K & R change places has the same bitmap. Therefore we list this value twice, a(1) = a(2) = 2^0 + 2^2 + 2^16 = 65541, and we do the same for the three values corresponding to the equivalent position in the other corners.

Examples

			The first term, a(1) = 2^0 + 2^2 + 2^16 = 65541, corresponds to the following position (omitting the first 4 empty ranks = rows):
      ........
      K.......
      ........
      k.R.....
where the black king "k" is in the corner on square a1 numbered 0, the white rook "R" is giving check from square c1 numbered 2, and the white king "K" is on square a3 numbered 16.
This is the only bitmap (up to 4-fold symmetry) that is ambiguous in that it represents two distinct positions: The white king and rook can exchange places, which yields a different checkmate position with the same bitmap. Therefore this term is listed twice, also as a(2). (The duplication of just the initial term (which is the only duplicate among the displayed data) does not affect the search results negatively, in case anyone searches for the sequence without duplicates.)
The next term, a(3) = 65545 = 2^0 + 2^3 + 2^16, corresponds to the position where the rook "R" is one square farther to the right (on square d1 numbered 3). There is no ambiguity here, for an exchange of "R" and "K", or any other two or three pieces on the same three squares, would not be a checkmate position.
		

Crossrefs

Subsequence of A014311 (numbers with Hamming weight 3).
Cf. A000120 (Hamming weight), A007088 (binary numbers).

Programs

  • PARI
    /* helper functions */ SYM(S, ROT=concat(Vecrev(matrix(8,,i,j,2^(i*8+j-9)))))=concat([ S=if(k, TRANS(S, ROT), concat(S, TRANS(S)))| k<-[0..3]])
    TRANS(S, FLIP=[2^(k+7-k%8*2) | k<-[0..31]])=[vecsum(vecextract(FLIP, p)) | p<-S]
    A362950=vecsort( SYM( concat([ [1+2^R+2^16 | R<-[2..7]] , [1+2^R+2^17 | R<-[2..7]], [2+2^R+2^17 | R<-[3..7]], concat([[ (1+2^16)<1] | K <- [2..3] ])  ])))

A367110 Decimal expansion of Sum_{k has exactly 3 bits equal to 1 in base 2} 1/k.

Original entry on oeis.org

1, 4, 2, 8, 5, 9, 1, 5, 4, 5, 8, 5, 2, 6, 3, 8, 1, 2, 3, 9, 9, 6, 8, 5, 4, 8, 4, 4, 4, 0, 0, 5, 3, 7, 9, 5, 2, 7, 8, 1, 6, 8, 8, 7, 5, 0, 9, 0, 6, 1, 3, 3, 0, 6, 8, 3, 9, 7, 1, 8, 9, 5, 2, 9, 7, 7, 5, 3, 6, 5, 9, 5, 0, 0, 3, 9, 7, 4, 4, 5, 2, 9, 6, 8, 0, 0, 5, 1, 1, 6, 3, 5, 7, 0, 8, 6, 2, 2, 7, 2, 7, 1, 9, 1, 5
Offset: 1

Views

Author

Tengiz Gogoberidze, Dec 16 2023

Keywords

Comments

For 1 bit equal to 1 the sum is 2, for 2 bits equal to 1 the sum is 1.52899956069688841838263949451... (see A179951).

Examples

			1.4285915458526381...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[iSum[1, 3, 105, 2]][[1]] (* Amiram Eldar, Dec 16 2023, using Baillie's irwinSums.m *)

Formula

Equals Sum_{m>=2} Sum_{j=1..m-1} Sum_{i=0..j-1} 1/(2^i + 2^j + 2^m).
Equals 2 * Sum_{j>=2} Sum_{i=1..j-1} 1/(2^i + 2^j + 1).
Equals Sum_{k>=1} 1/A014311(k).

A367680 Number of integer compositions x1+x2+...+xk of n such that each xj has exactly j bits set.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 1, 3, 2, 1, 2, 4, 2, 4, 6, 2, 4, 5, 10, 7, 10, 12, 8, 6, 11, 14, 16, 13, 16, 16, 14, 14, 30, 32, 19, 35, 28, 23, 27, 38, 36, 47, 44, 42, 55, 52, 51, 85, 88, 74, 84, 84, 72, 81, 102, 110, 122, 115, 108, 132, 137, 136, 179, 195, 164, 160, 181
Offset: 0

Views

Author

Arnauld Chevallier, Nov 26 2023

Keywords

Examples

			There are 6 such compositions for n = 14:
  14 = 1 + 6 + 7 (1 + 110 + 111)
  14 = 2 + 5 + 7 (10 + 101 + 111)
  14 = 2 + 12 (10 + 1100)
  14 = 4 + 3 + 7 (100 + 11 + 111)
  14 = 4 + 10 (100 + 1010)
  14 = 8 + 6 (1000 + 110)
Therefore a(14) = 6.
		

Crossrefs

Programs

  • PARI
    a(n) = my(nb=0); forpart(v=n, if (vecsort(apply(hammingweight, Vec(v))) == [1..#v], nb++)); nb; \\ Michel Marcus, Nov 28 2023
Previous Showing 61-64 of 64 results.