A097083
Positive values of k such that there is exactly one permutation p of (1,2,3,...,k) such that i+p(i) is a Fibonacci number for 1<=i<=k.
Original entry on oeis.org
1, 2, 3, 5, 9, 15, 24, 39, 64, 104, 168, 272, 441, 714, 1155, 1869, 3025, 4895, 7920, 12815, 20736, 33552, 54288, 87840, 142129, 229970, 372099, 602069, 974169, 1576239, 2550408, 4126647, 6677056, 10803704, 17480760, 28284464, 45765225
Offset: 1
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1,0,-1).
-
a=b=c=d=0;Table[e=a+b+d+1;a=b;b=c;c=d;d=e,{n,100}] (* Vladimir Joseph Stephan Orlovsky, Feb 26 2011 *)
CoefficientList[Series[x/((x - 1)*(x^2 + 1)*(x^2 + x - 1)), {x,0,50}], x] (* G. C. Greubel, Mar 05 2017 *)
LinearRecurrence[{2,-1,1,0,-1},{1,2,3,5,9},50] (* Harvey P. Dale, Nov 09 2024 *)
-
x='x+O('x^50); Vec(x/((x - 1)*(x^2 + 1)*(x^2 + x - 1))) \\ G. C. Greubel, Mar 05 2017
A096680
A card-arranging problem: values of n such that there exists more than one permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a cube for every i.
Original entry on oeis.org
112, 115, 116, 117, 119, 124, 125, 126, 127, 128, 129, 130, 133, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212
Offset: 1
117 is in the sequence with permutations
(7,6,...,2,1,117,116,...,9,8) and
(26,25,...,2,1,98,97,...28,27,117,116,...,100,99)
A096901
Number of permutations p of (1,2,3,...,n) such that k+p(k) is a triangular number for 1<=k<=n.
Original entry on oeis.org
1, 0, 1, 1, 0, 1, 1, 1, 2, 4, 3, 9, 14, 13, 52, 124, 161, 181, 715, 2338, 7073, 8624, 15466, 52858, 150365, 316543, 691771, 1681604, 5324919, 15407311, 37417775, 69725286, 155786456, 579599171, 2600274145, 10530031625, 22971756045, 47057778714, 112946192928
Offset: 0
A276735
Number of permutations p of (1..n) such that k+p(k) is a semiprime for 1 <= k <= n.
Original entry on oeis.org
1, 0, 0, 1, 1, 3, 5, 12, 87, 261, 324, 1433, 5881, 37444, 196797, 708901, 2020836, 12375966, 105896734, 955344450, 11136621319, 95274505723, 590283352231, 4285001635230, 36417581252044, 272699023606314
Offset: 0
a(4) = 1 because the permutation (3,4,1,2) added termwise to (1,2,3,4) yields (4,6,4,6) - both semiprimes - and only that permutation does so. a(5) = 3 because exactly 3 permutations - (3,2,1,5,4), (3,4,1,2,5) & (5,4,3,2,1) - added termwise to (1,2,3,4,5) yield semiprime entries.
From _David A. Corneth_, Sep 28 2016 (Start):
The semiprimes up to 10 are 4, 6, 9 and 10. To find a(5), we add (1,2,3,4,5) to some p. Therefore, p(1) in {3, 5}, p(2) in {2, 4}, p(3) in {1, 3}, p(4) in {2, 5} and p(5) in {1, 4, 5}.
If p(1) = 3 then p(3) must be 1. Then {p(2), p(4), p(5)} = {2, 4, 5} for which there are two possibilities.
If p(1) = 5 then p(3) = 3 and p(4) = 2. Then p(2) = 4 and p(5) = 1. So there's one permutation for which p(1) = 5.
This exhausts the options for p(1) and we found 3 permutations. Therefore, a(5) = 3. (End)
-
with(LinearAlgebra): with(numtheory):
a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)->
`if`((s-> bigomega(s)=2)(i+j), 1, 0)))):
seq(a(n), n=0..16); # Alois P. Heinz, Sep 28 2016
-
perms[n0_] :=
Module[{n = n0, S, func, T, T2},
S = Select[Range[2, 2*n], PrimeOmega[#] == 2 &];
func[k_] := Cases[S, x_ /; 1 <= x - k <= n] - k;
T = Tuples[Table[func[k], {k, 1, n}]];
T2 = Cases[T, x_ /; Length[Union[x]] == Length[x]];
Length[T2]]
Table[perms[n], {n, 0, 12}]
(* Second program (version >= 10): *)
a[0] = 1; a[n_] := Permanent[Table[Boole[PrimeOmega[i + j] == 2], {i, 1, n}, {j, 1, n}]]; Table[an = a[n]; Print[an]; an, {n, 0, 20}] (* Jean-François Alcover, Jul 25 2017 *)
-
isok(va, vb)=my(v = vector(#va, j, va[j]+vb[j])); #select(x->(bigomega(x) == 2), v) == #v;
a(n) = my(vpo = numtoperm(n,1)); sum(k=1, n!, vp = numtoperm(n,k); isok(vp, vpo)); \\ Michel Marcus, Sep 24 2016
-
listA001358(lim)=my(v=List()); forprime(p=2, sqrtint(lim\1), forprime(q=p, lim\p, listput(v, p*q))); Set(v)
has(v)=for(k=1,#v, if(!setsearch(semi, v[k]+k), return(0))); 1
a(n)=local(semi=listA001358(2*n)); sum(k=1,n!, has(numtoperm(n,k))) \\ Charles R Greathouse IV, Sep 28 2016
-
matperm(M)=my(n=matsize(M)[1], innerSums=vectorv(n)); if(n==0, return(1)); sum(x=1,2^n-1, my(k=valuation(x,2), s=M[,k+1], gray=bitxor(x,x>>1)); if(bittest(gray,k), innerSums+=s,innerSums-=s); (-1)^hammingweight(gray)*factorback(innerSums))*(-1)^n
a(n)=matperm(matrix(n,n,x,y,bigomega(x+y)==2)) \\ Charles R Greathouse IV, Oct 03 2016
Showing 1-4 of 4 results.
Comments